// =========================================================================== // 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: // AEffBlendSrfTemplate // // Description Name; // Creates the attribute editor controls for the ffBlendSrf node // // Input Value: // nodeName // // Output Value: // None // global proc AEffBlendSrfTemplate( string $nodeName ) { string $leftCurve = (uiRes("m_AEffBlendSrfTemplate.kLeftCurve")); string $rightCurve = (uiRes("m_AEffBlendSrfTemplate.kRightCurve")); editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEffBlendSrfTemplate.kRailCurves")) -collapse 1; editorTemplate -callCustom ("AEmultiInputNew \""+$leftCurve+"\"") ("AEmultiInputReplace \""+$leftCurve+"\"") "leftCurve"; editorTemplate -callCustom ("AEmultiInputNew \""+$rightCurve+"\"") ("AEmultiInputReplace \""+$rightCurve+"\"") "rightCurve"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEffBlendSrfTemplate.kOrientation")) -collapse 0; editorTemplate -addControl "autoNormal" "ffBlendAutoDirControls"; editorTemplate -interruptOptimize; editorTemplate -addControl "flipLeftNormal"; editorTemplate -addControl "flipRightNormal"; editorTemplate -addControl "reverseLeft"; editorTemplate -addControl "reverseRight"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEffBlendSrfTemplate.kPositiion")) -collapse 0; editorTemplate -addControl "autoAnchor" "ffBlendAutoAnchorControls"; editorTemplate -addControl "leftAnchor"; editorTemplate -addControl "leftStart"; editorTemplate -addControl "leftEnd"; editorTemplate -addControl "rightAnchor"; editorTemplate -addControl "rightStart"; editorTemplate -addControl "rightEnd"; editorTemplate -endLayout; editorTemplate -beginLayout (uiRes("m_AEffBlendSrfTemplate.kQuality")) -collapse 1; editorTemplate -addControl "positionTolerance"; editorTemplate -addControl "tangentTolerance"; editorTemplate -addControl "multipleKnots"; editorTemplate -endLayout; // include/call base class/node attributes AEabstractBaseCreateTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; editorTemplate -suppress "leftRail"; editorTemplate -suppress "rightRail"; } global proc ffBlendAutoDirControls( string $nodeName ) { string $attr = $nodeName + ".autoNormal"; int $value = `getAttr $attr`; if ($value == 0) { editorTemplate -dimControl $nodeName "flipLeftNormal" false; editorTemplate -dimControl $nodeName "flipRightNormal" false; } else { editorTemplate -dimControl $nodeName "flipLeftNormal" true; editorTemplate -dimControl $nodeName "flipRightNormal" true; } } global proc ffBlendAutoAnchorControls( string $nodeName ) { string $attr = $nodeName + ".autoAnchor"; int $value = `getAttr $attr`; if ($value == 0) { editorTemplate -dimControl $nodeName "leftAnchor" false; editorTemplate -dimControl $nodeName "rightAnchor" false; } else { editorTemplate -dimControl $nodeName "leftAnchor" true; editorTemplate -dimControl $nodeName "rightAnchor" true; } }