// =========================================================================== // 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: 17 Spetember 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 color control. // // Input Arguments: // The name of the existing control // The name of the new plug // // Return Value: // None // global proc AEreplaceColor ( string $controlName, string $plugName, string $changedCommand ) { // In case of multi, the label has to be updated to point a right index string $buffer[]; tokenize($plugName, ".", $buffer); string $attrName = $buffer[size($buffer) - 1]; tokenize($attrName, "[", $buffer); if( size($buffer) > 1 ) { attrColorSliderGrp -e -label $attrName $controlName; } attrColorSliderGrp -e -attribute $plugName $controlName; if ( $changedCommand != "" ) { string $buffer[]; tokenize($plugName,".",$buffer); string $cmd = $changedCommand+" \""+$buffer[0]+"\""; scriptJob -p $controlName -rp -ac $plugName $cmd; } }