// =========================================================================== // 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: // AEattachSurfaceTemplate // // Description Name; // Creates the attribute editor controls for the attachSurface Node // // Input Value: // nodeName // // Output Value: // None // global proc attachSurfaceBlendKnotInsertionControls( string $nodeName ) { int $m = `getAttr ($nodeName + ".blendKnotInsertion")`; if( 0 == $m ) { editorTemplate -dimControl $nodeName "parameter" true; } else { editorTemplate -dimControl $nodeName "parameter" false; } } global proc attachSurfaceMethodControls( string $nodeName ) { int $m = `getAttr ($nodeName + ".method")`; if( 0 == $m ) { editorTemplate -dimControl $nodeName "keepMultipleKnots" false; editorTemplate -dimControl $nodeName "blendBias" true; editorTemplate -dimControl $nodeName "blendKnotInsertion" true; editorTemplate -dimControl $nodeName "parameter" true; } else { editorTemplate -dimControl $nodeName "keepMultipleKnots" true; editorTemplate -dimControl $nodeName "blendBias" false; editorTemplate -dimControl $nodeName "blendKnotInsertion" false; attachSurfaceBlendKnotInsertionControls( $nodeName ); } } global proc AEattachSurfaceTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEattachSurfaceTemplate.kAttachSurfaceHistory")) -collapse 0; string $input1 = (uiRes("m_AEattachSurfaceTemplate.kInput1")); string $input2 = (uiRes("m_AEattachSurfaceTemplate.kInput2")); editorTemplate -callCustom ("AEinputNew \"" + $input1 + "\"") ("AEinputReplace \"" + $input1 + "\"") "inputSurface1"; editorTemplate -callCustom ("AEinputNew \"" + $input2 + "\"") ("AEinputReplace \"" + $input2 + "\"") "inputSurface2"; editorTemplate -addControl "method" "attachSurfaceMethodControls"; editorTemplate -addControl "blendBias"; editorTemplate -addControl "blendKnotInsertion" "attachSurfaceBlendKnotInsertionControls"; editorTemplate -addControl "parameter"; editorTemplate -addControl "keepMultipleKnots"; editorTemplate -addControl "directionU"; editorTemplate -addControl "reverse1"; editorTemplate -addControl "reverse2"; editorTemplate -addControl "swap1"; editorTemplate -addControl "swap2"; editorTemplate -addControl "twist"; editorTemplate -endLayout; // include/call base class/node attributes AEabstractBaseCreateTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }