// =========================================================================== // 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: December 2005 // // Procedure Name: // artAttrNComponentToolScript // // Description: // Invoke the Paint NComponent Attributes Tool with or without options window. // // Input Arguments: // 4 ==> enter the tool (create if necessary) // 3 ==> property sheet box // // Return Value: // None. // global proc string artAttrNComponentToolScript( int $setToTool, string $attr ) // // Description : // $setToTool: 3 = open tool options, 4 = don't open tool options // $attr = attribute to paint { global string $gArtAttrNComponentCurrentAttr; $gArtAttrNComponentCurrentAttr = $attr; makePaintable -attrType "doubleArray" "nComponent" "strengthPerVertex"; makePaintable -attrType "doubleArray" "nComponent" "glueStrengthPerVertex"; makePaintable -attrType "doubleArray" "nComponent" "weightPerVertex"; // NComponent Paint Attributes Tool string $tool = "artAttrNComponentContext"; if( ! `artAttrCtx -exists $tool` ) { rememberCtxSettings `artAttrCtx -i1 "attrPaint.png" -whichTool "NComponentPaint" $tool`; } setToolTo $tool; NComponentPaintCallback $attr; if( 3 == $setToTool ) { toolPropertyWindow; } else if( 4 != $setToTool ) { warning( (uiRes("m_artAttrNComponentToolScript.kWrongInput")) ); } return $tool; }