[Bf-python] Action name and Bone.getQuat()
Jiba
jiba at tuxfamily.org
Tue Aug 5 02:39:42 CEST 2003
> > Then, how is it possible to get the quaternion corresponding to the bone
> > rotation (in the armature, NOT from the Ipo !) ?
>
> Talking about the Armature module? Well, Jordi added that one, but he's
> not around now, so I've been taking care of it, slowly learning about
> armatures / bones.
>
> If what you want is the quaternion of the bone, it's in bone.quat, or
> method bone.getQuat(). To get access to the bones, use
> armature.getBones().
Actually, bone.quat returns only the part of rotation due to IPO, and not the part due to the armature. E.g., if no IPO are defined, bone.quat == [1.0, 0.0, 0.0, 0.0], whatever the rotation of the bone is.
According to Blender C source, only head, tail and roll are affected by the armature's bone rotation (see DNA_armature_types.h : 47, and armature.c). I'm currently diving into Blender's source, for finding how to rebuild the "rest state" 's quaternion from head and tail.
Jiba
More information about the Bf-python
mailing list