View Full Version : coping with joint orientation while scripting

05 May 2008, 07:08 PM
hi folks,

while using a script to setup a chain of joints, everything works fine, as long
as the joints are zeroed in rotation and joint orientation.

however, as soon as the joint-orients are non zero everything gets messed up.
basically, what is the scheme to counteract the joint orient?

a simple example:
joint orient is, say -30, 48,6, 99, rotations zeroed. then create nurbs circle at world origin.
then, if one parents the shape to the joint transform node, everything gets screwed up, since the joints orient acts as base for the parenting and the nurbsShape is oriented in any way, just not following the joint. guess work and counter-rotating the shape before parenting hardly ever works, nor is it scriptable.

how do you guys and girls cope with that joint orient issue?

thanks a bunch,

05 May 2008, 09:19 AM
Here is one possible strategy:
Write a script that will read your joint orientation and write those values to the rotation and zero out your joint orientation ( basically switch rotate and joint orientation). Do your thing with your script. Return the joint orientation and rotation to its original values.

another one:
use the "parent -add -shape myAwesomeAnimControlShape myAwesomeJoint" command to directly put the shape under the joint.

I hope this helps

05 May 2008, 10:14 AM
hi buexe,

sounds reasonable, i will give the switching approach a shot.

about shape parenting, that's what i did before and what gave the quirky results.

thanks, i'll be back as soon as i tested,

05 May 2008, 11:19 AM
okay, here is another one, an absolute aligning classic

delete`pointConstraint myCoolJoint myAwesomeCircle`;
delete`orientConstraint myCoolJoint myAwesomeCircle`;


CGTalk Moderation
05 May 2008, 11:19 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.