2
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Do you want to get the position? $\endgroup$ Commented Aug 27, 2014 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$ Commented Aug 27, 2014 at 15:07

0

You must log in to answer this question.

Browse other questions tagged .