// =========================================================================== // 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: // AEclusterCommon // // Description Name; // Creates the attribute editor controls for the cluster Node // // Input Value: // nodeName // // Output Value: // None // global proc checkClusterPartialResolution ( string $nodeName ) { string $nodeAttr = $nodeName + ".usePartialResolution"; int $value = `getAttr $nodeAttr`; if ($value == 0) { editorTemplate -dimControl $nodeName "percentResolution" true; } else { editorTemplate -dimControl $nodeName "percentResolution" false; } } global proc AEusePartialResolutionNew( string $attrName ) { setUITemplate -pst attributeEditorTemplate; attrEnumOptionMenuGrp -attribute $attrName -label (uiRes("m_AEclusterCommon.kResolution")) usePartialResolutionEnum; setUITemplate -ppt; AEusePartialResolutionReplace $attrName; } global proc AEusePartialResolutionReplace( string $attrName ) { string $tmp[]; tokenize($attrName, ".", $tmp); string $nodeName = $tmp[0]; attrEnumOptionMenuGrp -e -attribute $attrName -label (uiRes("m_AEclusterCommon.kResolution")) usePartialResolutionEnum; scriptJob -p usePartialResolutionEnum -rp -ac $attrName ("checkClusterPartialResolution " + $nodeName ); // Check the partial resoultion initial state // evalDeferred ("checkClusterPartialResolution " + $nodeName); } global proc AEclusterCommon ( string $nodeName ) { editorTemplate -addControl "relative"; editorTemplate -callCustom "AEusePartialResolutionNew" "AEusePartialResolutionReplace" "usePartialResolution"; editorTemplate -addControl "percentResolution"; editorTemplate -addControl "angleInterpolation"; //suppressed attributes editorTemplate -suppress "clusterXforms"; editorTemplate -suppress "matrix"; editorTemplate -suppress "bindPreMatrix"; editorTemplate -suppress "bindState"; }