// =========================================================================== // 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: Nov 19, 1998 // // Procedure Name: // AEwrapTemplate // // Description: // Creates attribute editor controls the wrap node // // Input Value: // nodeName // // Output Value: // None // global proc checkObeyExclusiveBind(string $nodeName) { int $value = `getAttr ($nodeName + ".exclusiveBind")`; if ($value) { editorTemplate -dimControl $nodeName "weightThreshold" 1; editorTemplate -dimControl $nodeName "autoWeightThreshold" 1; } else { editorTemplate -dimControl $nodeName "weightThreshold" 0; editorTemplate -dimControl $nodeName "autoWeightThreshold" 0; } } global proc checkObeyAutoWeightThreshold(string $nodeName) { int $value = `getAttr ($nodeName + ".autoWeightThreshold")`; if ($value) { editorTemplate -dimControl $nodeName "weightThreshold" 1; editorTemplate -dimControl $nodeName "maxDistance" 1; } else { editorTemplate -dimControl $nodeName "weightThreshold" 0; editorTemplate -dimControl $nodeName "maxDistance" 0; } } global proc checkAutoWeightThresholdValue(string $nodeName) { int $value = `getAttr ($nodeName + ".autoWeightThreshold")`; if ($value) { editorTemplate -dimControl $nodeName "autoWeightThresholdValue" 0; editorTemplate -dimControl $nodeName "weightThreshold" 1; editorTemplate -dimControl $nodeName "maxDistance" 1; } else { editorTemplate -dimControl $nodeName "autoWeightThresholdValue" 1; editorTemplate -dimControl $nodeName "weightThreshold" 0; editorTemplate -dimControl $nodeName "maxDistance" 0; } } global proc AEwrapTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEwrapTemplate.kWrapAttributes")) -collapse false; editorTemplate -beginNoOptimize; editorTemplate -addControl "falloffMode"; editorTemplate -addControl "exclusiveBind" "checkObeyExclusiveBind"; editorTemplate -addControl "autoWeightThreshold" "checkAutoWeightThresholdValue"; editorTemplate -addControl "autoWeightThresholdValue" "checkAutoWeightThresholdValue"; editorTemplate -endNoOptimize; editorTemplate -addSeparator; editorTemplate -addControl "weightThreshold"; editorTemplate -addControl "maxDistance"; editorTemplate -suppress "geomMatrix"; editorTemplate -suppress "driverPoints"; editorTemplate -suppress "basePoints"; editorTemplate -suppress "dropoff"; editorTemplate -suppress "smoothness"; editorTemplate -suppress "inflType"; editorTemplate -suppress "nurbsSamples"; editorTemplate -suppress "weightThreshold"; editorTemplate -suppress "wtDrty"; editorTemplate -suppress "baseDrt"; editorTemplate -endLayout; AEweightGeometryFilterTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }