// // // written by: Mike Paixao // // // to use: // // version 1: // // select 2 controllers or objects you want to switch // run the tool // // version 2: // // select a single object, this will flip it on itself // run the tool // // // more detail and video example available on my website // http://simpletofind.ca // // //global proc mPose() { string $sel[]; float $rotation[]; float $translation[]; float $rot1[]; float $rot2[]; float $tran1[]; float $tran2[]; $sel = `ls -sl`; if (`size $sel` == 1 ) { $rotation = `xform -q -ro`; $translation = `xform -q -t`; xform -t ($translation[0]*-1) ($translation[1]) ($translation[2]); xform -ro ($rotation[0]) ($rotation[1]*-1) ($rotation[2]*-1); } else if (`size $sel` == 2 ) { $rot1 = `xform -q -ro $sel[0]`; $tran1 = `xform -q -t $sel[0]`; $rot2 = `xform -q -ro $sel[1]`; $tran2 = `xform -q -t $sel[1]`; xform -t ($tran1[0]*-1) ($tran1[1]) ($tran1[2]) $sel[1]; xform -ro ($rot1[0]) ($rot1[1]*-1) ($rot1[2]*-1)$sel[1]; xform -t ($tran2[0]*-1) ($tran2[1]) ($tran2[2]) $sel[0]; xform -ro ($rot2[0]) ($rot2[1]*-1) ($rot2[2]*-1)$sel[0]; } }