// =========================================================================== // 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. // =========================================================================== // // // Creation Date: Aug 5, 2016 // // Procedure Name: // AEpolyRetopoTemplate // // Description Name; // Creates the attribute editor controls for the polyRetopo Node // // Input Value: // nodeName // // Output Value: // None // global proc AEpolyRetopoTemplate ( string $nodeName ) { editorTemplate -beginScrollLayout; // direction field attributes editorTemplate -beginLayout (uiRes("m_AEpolyRetopoTemplate.kDirectionField")) -collapse 0; editorTemplate -addControl "geodesicRadius"; editorTemplate -addControl "anisotropyFilter"; editorTemplate -addControl "magnitudeMin"; editorTemplate -addControl "curveSingularitySeparation"; editorTemplate -addControl "curveInfluenceDirection"; editorTemplate -endLayout; // topology editorTemplate -beginLayout (uiRes("m_AEpolyRetopoTemplate.kTopology")) -collapse 1; editorTemplate -addControl "targetFaceCount" "AEpolyRetopoTargetFaceCountChanged"; editorTemplate -addControl "targetEdgeLengthMin"; editorTemplate -addControl "targetEdgeLengthMax"; editorTemplate -addControl "anisotropy"; editorTemplate -addControl "resultRefinementLevel"; editorTemplate -addControl "resultSmoothing"; editorTemplate -endLayout; // include/call base class/node attributes AEpolyModifierInclude $nodeName; editorTemplate -addExtraControls; editorTemplate -endScrollLayout; } global proc AEpolyRetopoTargetFaceCountChanged( string $nodeName ) { if ( `objExists $nodeName` == 0 ) return; string $nodeAttr = $nodeName + ".targetFaceCount"; int $numFaces = `getAttr $nodeAttr`; editorTemplate -dimControl $nodeName "targetEdgeLengthMin" ($numFaces); editorTemplate -dimControl $nodeName "targetEdgeLengthMax" ($numFaces); }