// =========================================================================== // 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: June 3, 1997 // // Procedure Name: // AEreplaceMessage // // Description Name; // Updates the textFieldGrp to reflect a new selection // // Input Value: // The control name, plug name and changedCommand // // Output Value: // none // global proc AEreplaceMessage(string $controlName, string $plugName, string $changedCommand ) { string $buffer[]; tokenize($plugName, ".", $buffer); string $node = (size($buffer) > 0) ? $buffer[0] : ""; // give third parties a chance to provide an update handler for the attribute int $attributeHandledByCallbackResults[] = `callbacks -executeCallbacks -hook "AEreplaceAttributeHandler" $controlName $plugName $changedCommand`; for($attributeHandledByCallback in $attributeHandledByCallbackResults) { if($attributeHandledByCallback) { return; } } // connect the control with the attribute string $cmd = "AEupdateMessage \""+$controlName+"\" \""+$plugName+"\""; // update the textField eval($cmd); // reattach the scriptJob to the new plug scriptJob -p $controlName -rp -ac $plugName $cmd; // update the changedCommand if ($changedCommand != "") { $cmd = $changedCommand+" \""+$node+"\""; textFieldButtonGrp -e -cc $cmd $controlName; } }