// =========================================================================== // 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 29, 1997 // // Procedure Name: // AErevolvedPrimitiveCommon // // Description Name; // Creates the attribute editor controls for the revolvedPrimitive node // // Input Value: // nodeName // // Output Value: // None // global proc AErevolvedPrimitiveCommon( string $nodeName ) { editorTemplate -addControl "startSweep"; editorTemplate -addControl "endSweep"; editorTemplate -addControl "radius"; editorTemplate -addControl "degree"; editorTemplate -addControl "useTolerance" "revPrimUseTolControls"; editorTemplate -addControl "tolerance"; editorTemplate -addControl "sections"; editorTemplate -addControl "spans"; if ( `objectType $nodeName` == "makeNurbSphere" ) { editorTemplate -suppress "heightRatio"; } else { editorTemplate -addControl "heightRatio"; } } global proc revPrimUseTolControls( string $nodeName ) { string $useTolAttrName = $nodeName + ".useTolerance"; int $value = `getAttr $useTolAttrName`; if ( $value == 0 ) { editorTemplate -dimControl $nodeName "tolerance" true; editorTemplate -dimControl $nodeName "sections" false; editorTemplate -dimControl $nodeName "spans" false; } else { editorTemplate -dimControl $nodeName "tolerance" false; editorTemplate -dimControl $nodeName "sections" true; editorTemplate -dimControl $nodeName "spans" true; } }