View Full Version : xform problems with autoRig

03 March 2006, 11:14 AM
hi everyone,
im working on an autoRig MEL script atm and i've hit a small problem that is driving me nuts. The script generates small spheres which are used as guides for the various joints in the setup. Im working on a simple mirroring system that will mirror the selected guides either way....

to store the location of a guide sphere im using...
float $guidePos[] = `xform -q -ws -rp ("R_hipGuide")` ;

now i try to pass that location over to the opposite guide (with a negative X value)...
xform -t ($guidePos[0] * -1) $guidePos[1] $guidePos[2] -ws ("L_hipGuide") ;

at this point the guides are translated by the value stored in the $guidePos array, they are not translated to that value.

can someone please tell me what im doing wrong, i know there is a way.

Thanks in advance, Maximus.

03 March 2006, 11:21 AM
move -rpr ($guidePos[0] * -1) ($guidePos[1]) ($guidePos[2]) -ws ("L_hipGuide") ;

seems to work ok.....

if anyone else has a better way please suggest.


CGTalk Moderation
03 March 2006, 11:21 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.