Scripting Bone Orientation

KGKG Posts: 0
edited December 1969 in The Commons

Hi all!

Im trying to retrieve the direction of the bones, is there a way to do it?

For example, for the Right Shoulder I would expect an orientation like 1,0,0 (x,y,z)
For the Neck probably 0,1,0 ( let say the bone direction is upwards)

I tried with Node.getOrientation and getOrientYControl but the values returned don't look like a direction


Thank you

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,744
    edited December 1969

    getRotationOrder() will return a node's rotation order, which is a DzRotationOrder object - rot.firstAxis, rot.secondAxis and rot.thirdAxis will give the axes with 0 being x, 1 being y and 2 being z. There's also rot.order which is described as an enumerated order but the actual ordering isn't listed. Of course you can also see the rotation order in Tool Settings if you select the bone with the Joint Editor tool.

Sign In or Register to comment.