// =========================================================================== // 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. // =========================================================================== // // Procedure Name: // AEoffsetCurveTemplate // // Description Name; // Creates the attribute editor controls for the offsetCurve node // // Input Value: // nodeName // // Output Value: // None // global proc AEoffsetCurveTemplate( string $nodeName ) { string $inputCurve = (uiRes("m_AEoffsetCurveTemplate.kInputCurve")); editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEoffsetCurveTemplate.kOffsetCurveHistory")) -collapse false; editorTemplate -callCustom ("AEinputNew \""+$inputCurve+"\"") ("AEinputReplace \""+$inputCurve+"\"") "inputCurve"; editorTemplate -addControl "distance"; editorTemplate -addControl "connectBreaks"; editorTemplate -addControl "cutLoop" "cutLoopControls"; editorTemplate -addControl "cutRadius"; editorTemplate -addControl "useGivenNormal" "offsetNormalControls"; editorTemplate -addControl "normal"; editorTemplate -addControl "subdivisionDensity"; editorTemplate -addControl "tolerance"; editorTemplate -endLayout; // include/call base class/node attributes AEabstractBaseCreateTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; editorTemplate -suppress "stitch"; editorTemplate -suppress "reparameterize"; } global proc cutLoopControls( string $nodeName ) { string $cutLoopAttrName = $nodeName + ".cutLoop"; int $cutLoopValue = `getAttr $cutLoopAttrName`; if ( $cutLoopValue == 0 ) { editorTemplate -dimControl $nodeName "cutRadius" true; } else { editorTemplate -dimControl $nodeName "cutRadius" false; } } global proc offsetNormalControls( string $nodeName ) { string $useNormalAttrName = $nodeName + ".useGivenNormal"; int $useNormalValue = `getAttr $useNormalAttrName`; if ( $useNormalValue == 0 ) { editorTemplate -dimControl $nodeName "normal" true; } else { editorTemplate -dimControl $nodeName "normal" false; } }