// =========================================================================== // 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: // AEpolyExtrudeEdgeTemplate // // Description Name; // Creates the attribute editor controls for the polyExtrudeEdge Node // // Input Value: // nodeName // // Output Value: // None // global proc AEpolyExtrudeEdgeRampEnable(string $nodeName, int $val) { editorTemplate -dimControl $nodeName "taper" (1-$val); editorTemplate -dimControl $nodeName "twist" (1-$val); editorTemplate -dimControl $nodeName "taperCurve" (1-$val); } global proc AEpolyExtrudeEdgeNew( string $attrName ) { } global proc AEpolyExtrudeEdgeReplace( string $attrName ) { string $tmp[]; tokenize($attrName, ".", $tmp); string $nodeName = $tmp[0]; AEpolyExtrudeEdgeUpdateEnable($nodeName); } global proc AEpolyExtrudeEdgeUpdateEnable( string $nodeName ) { string $nodeAttr = $nodeName + ".inputProfile"; int $enable = 0; if (size(`listConnections $nodeAttr`)) { // inputCurve is being used. Enable the controls. $enable = 1; } AEpolyExtrudeEdgeRampEnable $nodeName $enable; } global proc AEpolyExtrudeEdgeTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; editorTemplate -beginLayout (uiRes("m_AEpolyExtrudeEdgeTemplate.kTransformAttributes")) -collapse 0; editorTemplate -addControl "translate"; editorTemplate -addControl "rotate"; editorTemplate -addControl "scale"; editorTemplate -addControl "pivot"; editorTemplate -endLayout; string $nodeAttr = $nodeName + ".inputProfile"; int $collapse = 1; if (size(`listConnections $nodeAttr`)) { // inputCurve is being used. Do not collapse the controls. $collapse = 0; } editorTemplate -beginLayout (uiRes("m_AEpolyExtrudeEdgeTemplate.kPolyExtrudeCurveAttributes")) -collapse $collapse; editorTemplate -addControl "twist" "AEpolyExtrudeEdgeUpdateEnable"; editorTemplate -addControl "taper"; AEaddRampControl ($nodeName+".taperCurve"); editorTemplate -endLayout; editorTemplate -callCustom "AEpolyExtrudeEdgeNew" AEpolyExtrudeEdgeReplace AEpolyExtrudeEdgeType; editorTemplate -beginLayout (uiRes("m_AEpolyExtrudeEdgeTemplate.kPolyExtrudeEdgeHistory")) -collapse 0; editorTemplate -addControl "divisions"; editorTemplate -addControl "offset"; editorTemplate -addControl "thickness"; editorTemplate -addControl "localTranslate"; editorTemplate -addControl "localRotate"; editorTemplate -addControl "localScale"; editorTemplate -addControl "localCenter"; editorTemplate -addControl "localDirection"; editorTemplate -addSeparator; editorTemplate -addControl "random"; editorTemplate -addControl "smoothingAngle"; editorTemplate -beginNoOptimize; editorTemplate -addControl "keepFacesTogether"; editorTemplate -endNoOptimize; // include/call base class/node attributes AEpolyModifierCommon $nodeName; editorTemplate -endLayout; editorTemplate -suppress "weight"; editorTemplate -suppress "gravity"; editorTemplate -suppress "attraction"; editorTemplate -suppress "magnet"; editorTemplate -suppress "gain"; editorTemplate -suppress "inputProfile"; // include/call base class/node attributes AEpolyModifierInclude $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }