// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: May 2000 // // // // Procedure Name: // art3dPaintToolScript // // Description: // create wrapper around the art3dPaint command // // Input Arguments: // 4 ==> enter the tool (create if necessary) // 3 ==> property sheet box // // Return Value: // None. // proc string art3dPaintCreateTool( string $toolName ) // // Description : // creates a artisan 3d paint tool context with the given name { if( ! `art3dPaintCtx -exists $toolName` ) { rememberCtxSettings `art3dPaintCtx -i1 "art3dPaint.png" $toolName`; } setToolTo $toolName; return $toolName; } global proc string art3dPaintToolScript( int $setToTool ) // // Description : // 4 ==> enter the tool { global string $gArtSelectObject ; // bug 222358 // select the object if it is not already selected by the user if( size($gArtSelectObject) > 0 ) { if( `objExists $gArtSelectObject` ) { select -r $gArtSelectObject ; } $gArtSelectObject = "" ; } string $tool = art3dPaintCreateTool("art3dPaintContext"); if( 3 == $setToTool ) { toolPropertyWindow; } else if( 4 != $setToTool ) { warning( (uiRes("m_art3dPaintToolScript.kWrongInput")) ); } return $tool; } global proc string art3dPaintHairAndToonToolScript( int $setToTool, string $toolName ) // // Description : // 4 ==> enter the tool { string $tool = art3dPaintCreateTool($toolName); if( 3 == $setToTool ) { toolPropertyWindow; } else if( 4 != $setToTool ) { warning( uiRes("m_art3dPaintToolScript.kWrongInput") ); } return $tool; }