// =========================================================================== // 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: // AEtextureDeformerTemplate // // Description: // Creates the attribute editor controls for the textureDeformer node // // Input Value: // nodeName // // Output Value: // None // // dim or undim the vector-related UI when direction mode is changed global proc switchTextureDeformerVectorModeUI( string $nodeName ) { string $nodeAttr = $nodeName + ".direction"; int $value = `getAttr $nodeAttr`; // if direction mode is "kVector" // dim "aStrength" and "aOffset" if ( $value == 2 ) { editorTemplate -dimControl $nodeName "strength" true; editorTemplate -dimControl $nodeName "offset" true; editorTemplate -dimControl $nodeName "vectorStrength" false; editorTemplate -dimControl $nodeName "vectorOffset" false; editorTemplate -dimControl $nodeName "vectorSpace" false; } // Otherwise, dim "aVectorStrength" and "aVectorOffset" else { editorTemplate -dimControl $nodeName "strength" false; editorTemplate -dimControl $nodeName "offset" false; editorTemplate -dimControl $nodeName "vectorStrength" true; editorTemplate -dimControl $nodeName "vectorOffset" true; editorTemplate -dimControl $nodeName "vectorSpace" true; } } global proc AEtextureDeformerTemplate( string $nodeName ) { editorTemplate -beginScrollLayout; // create AE template for texture deformer attributes editorTemplate -beginLayout (uiRes("m_AEtextureDeformerTemplate.kTextureDeformerAttributes")) -collapse false; editorTemplate -addControl "pointSpace"; editorTemplate -addControl "direction" "switchTextureDeformerVectorModeUI"; editorTemplate -addControl "vectorSpace"; editorTemplate -addControl "texture"; editorTemplate -addControl "strength"; editorTemplate -addControl "offset"; editorTemplate -addControl "vectorStrength"; editorTemplate -addControl "vectorOffset"; editorTemplate -addSeparator; editorTemplate -endLayout; // the following attributes are hidden on AE editorTemplate -suppress "startPosition"; editorTemplate -suppress "extendedEnd"; editorTemplate -suppress "handleVisibility"; editorTemplate -suppress "handleMatrix"; // create UI for parent class attributes AEweightGeometryFilterTemplate $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; }