// =========================================================================== // 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 27, 1997 // // Procedure Name: // AEairFieldTemplate // // Description Name; // Creates the attribute editor controls for the dragField Node // // Input Value: // nodeName // // Output Value: // None // // // Procedure Name: // checkUseDirection // global proc checkUseDirection ( string $nodeName ) { string $nodeAttr = $nodeName + ".useDirection"; int $value = `getAttr $nodeAttr`; if ( $value == 1 ) { editorTemplate -dimControl $nodeName "direction" false; } else { editorTemplate -dimControl $nodeName "direction" true; } } global proc AEdragCheckInheritVelocity( string $nodeName ) { float $value = `getAttr ($nodeName + ".inheritVelocity")`; int $dim = ($value == 0); editorTemplate -dimControl $nodeName "motionAttenuation" $dim; } // // Procedure Name: // AEdragFieldTemplate // global proc AEdragFieldTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; AEtransformMain $nodeName; editorTemplate -beginLayout (uiRes("m_AEdragFieldTemplate.kDragFieldAttributes")) -collapse 0; // include/call base class/node attributes AEfieldCommon $nodeName; editorTemplate -addControl "speedAttenuation"; editorTemplate -addControl "useDirection" "checkUseDirection"; editorTemplate -addControl "direction"; editorTemplate -addControl "inheritVelocity" "AEdragCheckInheritVelocity"; editorTemplate -addControl "motionAttenuation"; editorTemplate -endLayout; // include/call base class/node attributes AEfieldNoScroll $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }