// =========================================================================== // 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: // AEextendSurfaceTemplate // // Description Name; // Creates the attribute editor controls for the extendSurface node // // Input Value: // nodeName // // Output Value: // None // global proc extendSurfaceMethodControls( string $nodeName ) { string $attr = $nodeName + ".extendMethod"; int $value = `getAttr $attr`; if ($value == 0) { editorTemplate -dimControl $nodeName "extensionType" false; editorTemplate -dimControl $nodeName "distance" false; editorTemplate -dimControl $nodeName "inputPoint" true; } else if ($value == 1) { editorTemplate -dimControl $nodeName "extensionType" false; editorTemplate -dimControl $nodeName "distance" true; editorTemplate -dimControl $nodeName "inputPoint" true; } else { editorTemplate -dimControl $nodeName "extensionType" true; editorTemplate -dimControl $nodeName "distance" true; editorTemplate -dimControl $nodeName "inputPoint" false; } } global proc extendSurfaceJoinControls( string $nodeName ) { string $attr = $nodeName + ".join"; int $value = `getAttr $attr`; if ($value == 0) { editorTemplate -dimControl $nodeName "removeMultipleKnots" true; } else { editorTemplate -dimControl $nodeName "removeMultipleKnots" false; } } global proc AEextendSurfaceTemplate( string $nodeName ) { string $inputSurface = (uiRes("m_AEextendSurfaceTemplate.kInputSurface")); editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEextendSurfaceTemplate.kExtendSurfaceHistory")) -collapse false; editorTemplate -callCustom ("AEinputNew \""+$inputSurface+"\"") ("AEinputReplace \""+$inputSurface+"\"") "inputSurface"; editorTemplate -addControl "extensionType"; editorTemplate -addControl "distance"; editorTemplate -addControl "inputPoint"; editorTemplate -addControl "extendSide"; editorTemplate -addControl "extendDirection"; editorTemplate -addControl "removeMultipleKnots"; editorTemplate -endLayout; // include/call base class/node attributes AEabstractBaseCreateTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; editorTemplate -suppress "extendMethod" "extendSurfaceMethodControls"; editorTemplate -suppress "join" "extendSurfaceJoinControls"; editorTemplate -suppress "targetObject"; editorTemplate -suppress "outputSurface"; }