// =========================================================================== // 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: May 14, 1997 // // Procedure Name: // AEclusterHandleWtNodeNew // // Description Name; // Creates the multi attribute controls for the clusterHandle Node // // Input Value: // nodeName.attrName // // Output Value: // None // global proc AEclusterHandleWtNodeNew ( string $attr ) { string $buffer[]; tokenize($attr, ".", $buffer); string $nodeName = $buffer[0]; string $att = $buffer[1]; setUITemplate -pst attributeEditorTemplate; columnLayout ($att+"Column"); string $wNode[] =`listConnections -p false $attr`; string $wn,$un; string $tr[] =`listRelatives -p $nodeName`; if (!size($tr)) $tr[0]= $nodeName; $un=$tr[0]; if (size($wNode)) { $wn=$wNode[0]; } else { $wn=$un; } textFieldButtonGrp -label (uiRes("m_AEclusterHandleWtNodeNew.kWeightedNode")) -buttonLabel ">" -text $wn($att + "WtNode"); setParent ..; setUITemplate -ppt; AEclusterHandleWtNodeReplace $attr; } global proc AEclusterHandleWtNodeReplace ( string $attr ) { string $buffer[]; tokenize($attr, ".", $buffer); string $nodeName = $buffer[0]; string $att = $buffer[1]; string $wNode[] =`listConnections -p false $attr`; string $wn,$un; string $tr[] =`listRelatives -p $nodeName`; if (!size($tr)) $tr[0]= $nodeName; $un=$tr[0]; if (size($wNode)) { $wn=$wNode[0]; } else { $wn=$un; } setUITemplate -pst attributeEditorTemplate; setParent ($att+"Column"); string $ccmd="string $wnode=`textFieldButtonGrp -q -tx " +$att+"WtNode`;if (catch(`cluster -e -bs 1 -wn $wnode $wnode "+$nodeName+ "`)){textFieldButtonGrp -e -tx `cluster -q -wn "+$nodeName+"`;}"; string $bccmd="string $wnode=`textFieldButtonGrp -q -tx " +$att+"WtNode`;select $wnode;editSelected;"; textFieldButtonGrp -e -label (uiRes("m_AEclusterHandleWtNodeNew.kWeightedNode")) -buttonLabel ">" -text $wn-cc $ccmd -bc $bccmd ($att+"WtNode"); setParent ..; setUITemplate -ppt; }