// =========================================================================== // 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. // =========================================================================== // Procedure Name: // AEnewTime // // Description Name; // Creates a timeFieldGrp for the attribute editor // // Input Value: // plug name, attribute name, and changedCommand // // Output Value: // Returns the name of the newly created timeFieldGrp // global proc string AEnewTime( string $plugName, string $attrName, string $changedCommand ) { string $createdControl = `timeFieldGrp -label $attrName`; // connect the control connectControl -index 2 $createdControl $plugName; if ( $changedCommand != "" ) { string $buffer[]; tokenize($plugName,".",$buffer); string $cmd = $changedCommand+" \""+$buffer[0]+"\""; scriptJob -p $createdControl -rp -ac $plugName $cmd; } return $createdControl; }