[Bf-python] What does Armature.EditBone.matrix really does?
Rodrigo Hernandez
kwizatz at aeongames.com
Thu Oct 30 22:28:22 CET 2008
*Hello,
For an importer I am writing I need to set bones with a matrix, so when
I create armature bones I use Armature.EditBone.matrix, however, on the
UI there is no way to set an edit bone matrix or clear rotation or
scale, all manipulation is done through head tail and roll, which are
also available through the **Armature.EditBone object.
I was looking at the Blender code, and the EditBone struct doesn't seem
to even keep a matrix, so I need to know how exactly does the Python
variable works in order to set it correctly, or switch to using just
head, tail and roll.
Right now my exporter works halfway, the bones are created, and
seemingly positioned in the right places by just setting the matrix, but
no rotation or scale is reflected, however, if I set them to be
connected, I get errors later on pose bones. What happens to scale and
rotation set this way? would I be ok, if I only used the matrices to
determine the position of the heads and assume then all bone matrices
are set to the identity matrix?
Can someone tell me how do the matrix translates to head,tail,roll? or
just point me to the file on the Blender source that contains the
assignment function so I can use its operations in reverse.
Thanks in advance.
*
More information about the Bf-python
mailing list