Page 1 of 1

Get a pose bone's rotation *after* constraints/modifiers?

PostPosted: Sat Jan 23, 2021 3:29 pm
by joepal
I'm struggling a bit.

I have an arm rig which is in pose mode. The arm is a chain with four bones with an ik constraint, connected to a shoulder which is outside the ik chain:

* shoulder (unaffected by IK)
* upper arm 1 (last bone in IK chain)
* upper arm 2
* lower arm 1
* lower arm 2 (has IK constraint)

Now I want to know the rotation of "upper arm 1" relative to its rest position, in *local* space. That is, disregarding its parent's rotation and disregaring the whole armature's rotation. If the ik chain hasn't shifted the bone at all from its rest position, this should be (0, 0, 0) XYZ rotation.

Looking at https://docs.blender.org/api/current/bp ... eBone.html I have tried the following:

* rotation_euler / rotation_quaternion: These don't work since they are *before* constraints/modifiers and I want the rotation *after* constraints/modifier
* matrix.to_euler() / matrix.to_quaternion(): This sounds as what I want, but the matrix is in object space, not local space. Maybe there is a clever way to convert it to local space?

So question: how do I find a pose bone's rotation relative to its rest position in local space, including the effect of any modifier/constraint?

Re: Get a pose bone's rotation *after* constraints/modifiers

PostPosted: Sat Jan 23, 2021 5:20 pm
by fake_Person
hmm
may I have a picture, ( out don't have to)
sorry your big brain words hurt me.
you can rotate a boned that is yellow in pose mode (yellow being Ik. like for the lower arm 2)
you can still interact with yellow bones.
you can reset the rotations of the bones with ALT+ R

if this didn't help I'm scenery sorry

i dont know python yet