Query Joint Local Rotation Axes[PyMel]

Hi,

Is there a way to query a joints local rotation axes?

//Dabbo

What d’you want to get? Eulers? Those can be found in the .jointOrient attribute on the joint. Vectors? It might just be easiest to compose a matrix using the Eulers and get each axis from there. So for joint jnt:

tm = pmc.datatypes.TransformationMatrix()
tm.setRotation(jnt.jointOrient.get())
x_axis = tm[0]
y_axis = tm[1]
z_axis = tm[2]
1 Like

I wanted to get some kind of value that represents the local rotation axes that is visible when orienting joints. I thought the Joint Orient attribute was not the attribute displaying this as it was not updating straight away. I had to deselect and select again to see a change.

Thanks for taking the time to answer! :slight_smile: