// Copyright (C) 1997-2004 Alias Systems Corp. // // The information in this file is provided for the exclusive use of the // licensees of Alias. Such users have the right to use, modify, // and incorporate this code into other products for purposes authorized // by the Alias license agreement, without fee. // // ALIAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO // EVENT SHALL ALIAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. // // Alias Script File // // Creation Date: July 14, 1997 // // Procedure Name: // AEreplaceString // // Description Name; // Updates the textFieldGrp to reflect a new selection // // Input Value: // The control name, plug name and changedCommand // // Output Value: // none // global proc AEreplaceString(string $controlName, string $plugName, string $changedCommand ) { string $buffer[]; tokenize($plugName, ".", $buffer); string $node = (size($buffer) > 0) ? $buffer[0] : ""; // special control for mental ray node if( isClassified($node, "rendernode/mentalray") ) { AEmentalrayReplaceString($controlName, $plugName, $changedCommand); return; } // Change the label on the control to match the new // plug's attribute name // if( `textFieldGrp -exists $controlName` ) { string $attrName[] = `listAttr $plugName`; if( size( $attrName ) == 1 ) { textFieldGrp -e -l $attrName[0] $controlName; } } // connect the control with the attribute // connectControl -index 2 $controlName $plugName; if ( $changedCommand != "") { string $buffer[]; tokenize($plugName,".",$buffer); string $cmd = $changedCommand+" \""+$buffer[0]+"\""; scriptJob -p $controlName -rp -ac $plugName $cmd; } }