// =========================================================================== // 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: // artAttrNClothToolScript // // Description: // Invoke the Paint NCloth 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 artAttrNClothToolScript( int $setToTool, string $attr ) // // Description : // $setToTool: 3 = open tool options, 4 = don't open tool options // $attr = attribute to paint { global string $gArtAttrNClothCurrentAttr; $gArtAttrNClothCurrentAttr = $attr; makePaintable -attrType "doubleArray" "nCloth" "thicknessPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "bouncePerVertex"; makePaintable -attrType "doubleArray" "nCloth" "frictionPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "stickinessPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "collideStrengthPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "fieldMagnitudePerVertex"; makePaintable -attrType "doubleArray" "nRigid" "thicknessPerVertex"; makePaintable -attrType "doubleArray" "nRigid" "bouncePerVertex"; makePaintable -attrType "doubleArray" "nRigid" "frictionPerVertex"; makePaintable -attrType "doubleArray" "nRigid" "stickinessPerVertex"; makePaintable -attrType "doubleArray" "nRigid" "collideStrengthPerVertex"; makePaintable -attrType "doubleArray" "nRigid" "fieldMagnitudePerVertex"; makePaintable -attrType "doubleArray" "nCloth" "massPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "stretchPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "compressionPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "bendPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "bendAngleDropoffPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "restitutionAnglePerVertex"; makePaintable -attrType "doubleArray" "nCloth" "dampPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "rigidityPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "deformPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "inputAttractPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "restLengthScalePerVertex"; makePaintable -attrType "doubleArray" "nCloth" "wrinklePerVertex"; makePaintable -attrType "doubleArray" "nCloth" "liftPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "dragPerVertex"; makePaintable -attrType "doubleArray" "nCloth" "tangentialDragPerVertex"; // NCloth Paint Attributes Tool string $tool = "artAttrNClothContext"; if( ! `artAttrCtx -exists $tool` ) { rememberCtxSettings `artAttrCtx -i1 "attrPaint.png" -whichTool "NClothPaint" $tool`; } setToolTo $tool; NClothPaintCallback $attr; if( 3 == $setToTool ) { toolPropertyWindow; } else if( 4 != $setToTool ) { warning( (uiRes("m_artAttrNClothToolScript.kWrongInput"))); } return $tool; }