// =========================================================================== // 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. // =========================================================================== global proc setTRSOrientJoint( string $parent, int $what[], string $tool ) { setParent $parent; // Update UI according to what has been selected. if ( size( $what ) ) { switch( $what[0] ) { case 0: manipMoveOrientJointPrefs $parent; break; case 1: jointOrientWorldSelected $parent; break; case 2: jointOrientPrimarySelected $parent; break; case 3: jointOrientSecondarySelected $parent; break; default: break; } } // Determine if joint orientation is enabled int $state = `checkBoxGrp -q -v1 orientJointCheckBox`; // Get the string representation of the oj and sao params string $axes[] = {}; jointOrientGetOrientAxes( $parent, $axes ); // Update the oj manip params manipMoveContext -e -oje $state $tool; manipMoveContext -e -oj $axes[0] $tool; manipMoveContext -e -sao $axes[1] $tool; }