// =========================================================================== // 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: 28 June 1996 // // Description: // This is part of a set of methods for changing // a property sheet to point to a new node. // (A way of efficiently re-using existing controls) // This method re-connects a boolean control. // // Input Arguments: // The name of the existing control // The name of the new plug // // Return Value: // None // global proc AEreplaceVector ( string $controlName, string $plugName, string $changedCommand ) { string $buffer[]; tokenize($plugName,".",$buffer); attrFieldGrp -e -attribute $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 ) ) { attrFieldGrp -e -label $label $controlName; } if ( $changedCommand != "" ) { string $cmd = $changedCommand+" \""+$buffer[0]+"\""; scriptJob -p $controlName -rp -ac $plugName $cmd; } }