// =========================================================================== // 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: // AEobjectSetNoScroll // // Description Name; // Creates the attribute editor controls for the objectSet Node // // Input Value: // nodeName // // Output Value: // None // // // Procedure Name: // changeSetColor // global proc changeSetColor ( string $memberWireframeColor ) { int $setColorSliderValue = `colorIndexSliderGrp -q -v setIndexColorSlider`; int $setColorValue = $setColorSliderValue - 25; setAttr $memberWireframeColor $setColorValue; } global proc updateSetWireframeColor (string $memberWireframeColor) { // check to set the correct initial settings int $setColorValue = `getAttr $memberWireframeColor`; int $setColorSliderValue = $setColorValue + 25; if ( $setColorSliderValue < 25 || $setColorSliderValue > 32 ) { $setColorSliderValue = 25; } if ($setColorValue == -1) { colorIndexSliderGrp -e -en 0 setIndexColorSlider; checkBoxGrp -e -v1 off setColorCheckBox; } else { colorIndexSliderGrp -e -en 1 -v $setColorSliderValue setIndexColorSlider; checkBoxGrp -e -v1 on setColorCheckBox; } } // // Procedure Name: // AEsetColorReplace // // global proc AEsetColorReplace (string $memberWireframeColor) { int $setColorValue = `getAttr $memberWireframeColor`; int $setColorSliderValue = $setColorValue + 25; if ( $setColorSliderValue < 25 || $setColorSliderValue > 32 ) { $setColorSliderValue = 25; } checkBoxGrp -e -cc ("checkSetCheckBox " + $memberWireframeColor) setColorCheckBox; colorIndexSliderGrp -e //-v $setColorSliderValue -cc ("changeSetColor " + $memberWireframeColor ) setIndexColorSlider; scriptJob -p setIndexColorSlider -rp -attributeChange $memberWireframeColor ("updateSetWireframeColor "+$memberWireframeColor); updateSetWireframeColor $memberWireframeColor; } // // Procedure Name: // AEsetColorNew // global proc AEsetColorNew ( string $memberWireframeColor ) { setUITemplate -pst attributeEditorTemplate; checkBoxGrp -ncb 1 -l "" -label1 (uiRes("m_AEobjectSetNoScroll.kOverrideDefaultComponentColor")) setColorCheckBox; colorIndexSliderGrp -label (uiRes("m_AEobjectSetNoScroll.kComponentColor")) -v 25 -min 25 // 25 to 32 is the userDefinedColor -max 32 // index range setIndexColorSlider; setUITemplate -ppt; scriptJob -p setIndexColorSlider -rp -attributeChange $memberWireframeColor ("updateSetWireframeColor "+$memberWireframeColor); AEsetColorReplace $memberWireframeColor; } global proc checkSetCheckBox (string $memberWireframeColor) { int $setColor = `getAttr $memberWireframeColor`; if (`checkBoxGrp -q -v1 setColorCheckBox`) { if ($setColor == -1) { colorIndexSliderGrp -e -en 1 setIndexColorSlider; if (`colorIndexSliderGrp -q -v setIndexColorSlider` == -1) { setAttr $memberWireframeColor 0; updateSetWireframeColor $memberWireframeColor; } else { setAttr $memberWireframeColor ((`colorIndexSliderGrp -q -v setIndexColorSlider`) - 25); updateSetWireframeColor $memberWireframeColor;; } } else { colorIndexSliderGrp -e -en 1 setIndexColorSlider; setAttr $memberWireframeColor $setColor; updateSetWireframeColor $memberWireframeColor; } } else { colorIndexSliderGrp -e -en 0 setIndexColorSlider; setAttr $memberWireframeColor -1; updateSetWireframeColor $memberWireframeColor; } } global proc AEobjectSetCommonRefreshOutliners() { string $eds[] = `lsUI -editors`; for ( $ed in $eds ) { if ( `outlinerEditor -exists $ed` ) outlinerEditor -e -refresh $ed; } } global proc AEobjectSetHiddenInOutlinerNew(string $plug) { setUITemplate -pst attributeEditorTemplate; checkBoxGrp -label1 (uiRes("m_AEobjectSetNoScroll.kHiddenInOutliner")) objectSetHiddenInOutlinerCheck; AEobjectSetHiddenInOutlinerReplace($plug); setUITemplate -ppt; } global proc AEobjectSetHiddenInOutlinerReplace(string $plug) { int $v = `getAttr $plug`; checkBoxGrp -e -value1 $v objectSetHiddenInOutlinerCheck; checkBoxGrp -e -cc ("setAttr " + $plug + " #1;AEobjectSetCommonRefreshOutliners();") objectSetHiddenInOutlinerCheck; } // // Procedure Name: // AEobjectSetTemplate // global proc AEobjectSetNoScroll ( string $nodeName ) { editorTemplate -beginLayout (uiRes("m_AEobjectSetNoScroll.kSetOptions")) ; editorTemplate -callCustom "AEsetColorNew" "AEsetColorReplace" "memberWireframeColor"; editorTemplate -callCustom "AEobjectSetHiddenInOutlinerNew" "AEobjectSetHiddenInOutlinerReplace" "hiddenInOutliner"; editorTemplate -endLayout; // include/call base class/node attributes AEentityTemplate $nodeName; // suppresses attributes editorTemplate -suppress "annotation"; editorTemplate -suppress "partition"; editorTemplate -suppress "isLayer"; editorTemplate -suppress "verticesOnlySet"; editorTemplate -suppress "edgesOnlySet"; editorTemplate -suppress "facetsOnlySet"; editorTemplate -suppress "editPointsOnlySet"; editorTemplate -suppress "renderableOnlySet"; editorTemplate -suppress "dagSetMembers"; editorTemplate -suppress "dnSetMembers"; editorTemplate -suppress "groupNodes"; editorTemplate -suppress "usedBy"; AEcontainerNodeSuppress $nodeName; }