// =========================================================================== // 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 29, 1997 // // Procedure Name: // AEreplaceEnum // // Description Name; // Creates an optionMenu for enumerated attributes // // Input Value: // nodeName // // Output Value: // None // global proc AEreplaceEnum( string $controlName, string $plugName, string $changedCommand ) { string $buffer[]; tokenize($plugName,".",$buffer); attrEnumOptionMenuGrp -e -at $plugName $controlName; // -queryLabel can fail for non-unique node names // string $label = ""; catch( $label = `editorTemplate -queryLabel $buffer[0] $buffer[size($buffer) - 1]` ); if( size( $label ) ) { attrEnumOptionMenuGrp -e -label $label $controlName; } if ( $changedCommand != "" ) { string $cmd = $changedCommand + " \"" + $buffer[0] + "\""; scriptJob -p $controlName -rp -ac $plugName $cmd; } }