// Copy Transformations Tool 2 // Written by Jeremy Cantor // December 19, 2001 global proc do_trans(string $areWeBaking) { string $picked[] = `ls -sl`; if (size($picked) <= 1) {text -e -l "Must select at least two items" feedbackText; return;} text -e -l ("Magnet: " + $picked[0]) feedbackText; for ($x=1; $x $rangeEnd) intField -e -v $rangeEnd rangeStart; } global proc checkEnd() { int $rangeStart = `intField -q -v rangeStart`; int $rangeEnd = `intField -q -v rangeEnd`; if ($rangeEnd < $rangeStart) intField -e -v $rangeStart rangeEnd; } global proc copyTransformations() { if ((`window -ex copyTransformations`) == true) deleteUI copyTransformations; if (`windowPref -q -ex copyTransformations`){ if ((`windowPref -q -w copyTransformations`) != 250) windowPref -e -w 250 copyTransformations; if ((`windowPref -q -h copyTransformations`) != 205) windowPref -e -h 205 copyTransformations;} window -title " Copy Transfs 03.07.02" -mnb true -s true copyTransformations; rowColumnLayout -nr 10 -rh 1 5 -rh 2 22 -rh 3 22 -rh 4 22 -rh 5 22 -rh 6 22 -rh 7 5 -rh 8 22 -rh 9 5 -rh 10 22; //row 1 button -l "" -vis false; //row 2 rowColumnLayout -nc 2 -cw 1 230 -co 1 "left" 15; text -al "left" -l "Shift-Select Magnet (first), then Copycat(s)" feedbackText; setParent ..; //row 3 rowColumnLayout -nc 2 -cw 1 105 -cw 2 150 -co 1 "left" 10 -co 2 "left" 10; button -l "TRANSLATION" -c ("do_trans \"no\""); checkBox -v 0 -l " key new position" keyTrans; setParent ..; //row 4 rowColumnLayout -nc 2 -cw 1 105 -cw 2 150 -co 1 "left" 10 -co 2 "left" 10; button -l "ROTATION" -c ("do_rot \"no\""); checkBox -v 0 -l " key new orientation" keyRot; setParent ..; //row 5 rowColumnLayout -nc 2 -cw 1 105 -cw 2 150 -co 1 "left" 10 -co 2 "left" 10; button -l "SCALE" -c ("do_scale \"no\""); checkBox -v 0 -l " key new scale" keyScale; setParent ..; //row 6 rowColumnLayout -nc 4 -cw 1 90 -cw 2 80 -cw 3 10 -cw 4 50 -co 1 "left" 10; button -l "prev frame" -c "currentTime (`currentTime -q` - 1)"; button -l "next frame" -c "currentTime (`currentTime -q` + 1)"; button -l "" -en false; button -l "undo" -c "undo"; setParent ..; //row 7 button -l "" -vis false; //row 8 rowColumnLayout -nc 7 -cw 1 40 -cw 2 40 -cw 3 20 -cw 4 40 -cw 5 20 -cw 6 30 -cw 7 40 -co 1 "left" 10 -co 7 "left" 5; text -l "From" -en false rangeText; intField -v (`playbackOptions -q -min`) -en false -cc checkStart rangeStart; text -l " to" -en false toText; intField -v (`playbackOptions -q -max`) -en false -cc checkEnd rangeEnd; text -l " by" -en false byText; intField -v 1 -en false stepBy; button -l "reset" -en false -c resetRange resetButton; setParent ..; //row 9 button -l "" -vis false; //row 10 rowColumnLayout -nc 4 -cw 1 65 -cw 2 70 -cw 3 50 -cw 4 55 -co 1 "left" 10 -co 2 "left" 10; button -l "BAKE" -en false -c doBake bakeButton; checkBox -v 0 -l "Trans" -cc enableBaking bakeTrans; checkBox -v 0 -l "Rot" -cc enableBaking bakeRot; checkBox -v 0 -l "Scale" -cc enableBaking bakeScale; setParent ..; showWindow copyTransformations; } copyTransformations;