[Bf-python] Bone Information Question

Jiba jiba at tuxfamily.org
Mon Aug 18 19:52:20 CEST 2003


On Sat, 16 Aug 2003 18:32:49 -0400
kp991533 <kp991533 at ncat.edu> wrote:

> I am trying to make an exporter like everyone else. I thought I know what a 
> bones' head, tail and roll where. But I dont.
> 
> I need to find the origin of rotation for the bones and the rotaion. I am 
> assuming that the quat I get from a bone it relative to the origin that I cant 
> find.

No, the quat bone property is NOT what you think !

The bone "rest state" is defined by the head, tail and roll property only. Then the animation is defined by the quat, translation ans size ; they are totally different thing in Blender (yes it's quite confusing).

I've already done a Blender export script (attached here). Look at the blender_bone2matrix() function which convert the head, tail and roll to a matrix (which can easily be converted to a quaternion with matrix2quaternion()), and the skeleton exportation code near line 660. These codes are directly inspired by Blender C source.

Jiba
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blender2cal3d.py
Type: application/octet-stream
Size: 32401 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20030818/ddfe1fd4/attachment.obj>


More information about the Bf-python mailing list