Reading Constraint output values

Hi there, I have a setup where one bone is contrilled by a copy rotation constraint and i need to read the bone’s rotation after the constraint has been applied. When i use the normal method of accesing the rotation values in pose mode via python all that is returned is the bone’s rotation value before the constraint has been applied. An example:

Bone A has an x rotation of 5
Bone B has an x rotation of 20
I add a copy rotation constraint to bone A, telling it to copy bone B’s x rotation
On screen bone A appears to have rotated as expected and looks the same as bone B
When i access bone A’s x rotation it still reads 5, when what i need the final output value of 20

I guess its a targeting problem, does anyone know the method for accessing a constraints properties

Anyone had this problem before?

Haven’t used the python in a while, but I believe you will have to access the bone’s matrix. Just getting the rotation returns the Ipo (keyed) values, which is overridden by the constraint. Once you get the matrix, it will be a 4x4 array of numbers. Look for a python function called something like “rotation from matrix” (once again, not used py in long time), which will give you the actual rotations our of the grid of numbers.

However – if you just are looking to find the numbers themselves, you can just set a VisualLocRot key on that bone and read the numbers in the N-key panel. VisualLocRot does the matrix lookup/math for you and creates a real Ipo-key based on it.