In my python script I want to get the location of the head of the bone, in the parent's local matrix. This means that the equation:

b.head_local = b.parent_n.local_matrix * .... * b.parent.local_matrix * searched

I know bone.head but it seems this is sometimes relative to the tail of the parent. I say sometimes because I can't figure out when this is the case.

Can someone help me out with this? An alternative way to get the searched coordinates would help out as well.

EDIT: I don't understand the variables that blender offers on bones at all. None of them except bone.head_local and bone.tail_local. If someone could explain them that would be honorable.

  • $\begingroup$ Do you want to get the position? $\endgroup$ – someonewithpc Aug 27 '14 at 15:04
  • $\begingroup$ The position in the parent's matrix aka. parmatrix * pos = somepos and if that pos is then again multiplied with the parent's parent, etc... until no parent exists that position would be the armature-local position $\endgroup$ – WorldSEnder Aug 27 '14 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.