how to snap one object to another object with MEL script

global proc snapIt(){ string $sel[] = `ls -sl`; float $trA[] = `xform -q -ws -t $sel[1]`; float $rpA[] = `xform -q -rp $sel[1]`; float $rpB[] = `xform -q -rp $sel[0]`; xform -ws -t ($trA[0] + $rpA[0] - $rpB[0]) ($trA[1] + $rpA[1] - $rpB[1]) ($trA[2] + $rpA[2] - $rpB[2]) $sel[0]; } snapIt;

No comments:

Post a Comment

Thank you, your critique has been accepted