|
I am getting a weird double transform error in Max 2010. I am running a simple Max Script on a standard Character Studio Biped rig. Basically it finds out the position of the root $Bip01 node and stores it. Then it checks a helper bone called “Bip01 L Toe0Nub” and “Bip01 R Toe0Nub” to see which one is lower. It uses the lower bone’s Z position to determine how much to offset the Biped’s Z position and get the feet on the ground. My code worked fine in Max 2008 but seems to run into a weird error in 2010:
--check to see which foot is lower to the ground if ($Bip01_R_Toe0Nub.pos.z < $Bip01_L_Toe0Nub.pos.z)
then zOffset = ($Bip01_R_Toe0Nub.pos.z * -1) else zOffset = ($Bip01_L_Toe0Nub.pos.z * -1)
--puts Biped in "move all mode" to be able to put global offsets on its position.
--root $Bip01 node should be at X and Y at 0.
select $Bip01
$bip01.transform.controller.moveallmode = true
offsetCoords = biped.getTransform $bip01 #pos move $bip01 [(offsetCoords.x * -1),(offsetCoords.y * -1) ,zOffset]
biped.collapseMoveAllMode $bip01.transform.controller
$bip01.transform.controller.moveallmode = false
The problematic line of code seems to be:
move $bip01 [(offsetCoords.x * -1),(offsetCoords.y * -1) ,zOffset]
When testing it, it seems to move the biped by twice what the values are (eg zOffset * 2). Can anyone figure this out or is Max 2010 still too new? Luckily I still have 2008 installed so I can run the script but this is a really annoying bug.
- Howard Hsu http://www.linkedin.com/in/howardab234
Now using:
Windows XP 64 Pro v2003 SP2 (yes XP64 is still around)
Core 2 Quad CPU Q6600 @ 2.4GHz
2GB RAM
NVidia GeForce 8800 GTX
Max 2008 x64
Maya 2008 64
MotionBuilder 7.5
|