[Bf-committers] Armatures for beyond Release 2.4

Gilbert, Joseph T. jgilbert at tigr.ORG
Fri Dec 23 16:19:19 CET 2005

This is part python api so I'll cc it to the python list...

>From what I've seen armatures in file formats many times are defined by
a vector/roll or a quat/loc (mostly). Blender uses the vector/roll.
Internally the matrix for the bone is built from the vector/roll which
is y the python api exposes this. There isn't really any reason that you
couldn't define the bone as quat/loc but blender doesn't do this
internally and the api would need to 'fudge' it. i.e. provide some
pythonic decomposition to change quat/loc into vector/roll. Ditto for
defining a bone by a transformation matrix.

I think that what the python api could create some 'fudges' to convert a
transformation matrix and/or a quat/loc into the vector_head,
vector_tail, roll This way you could add methods like setMatrix(),
setQuat(), setLoc(), setLength() to the armature bone.

Now for the api for the pose of the bones (which is not in cvs). You
should be able to set a (delta) loc,size,quat from the parent like what
you see in the properties window of posemode. This again seems a bit
bizarre because it would seem more natural to set a transformation
matrix here. So potentially some setMatrix()->quat/loc/size fudges might
be required in the python api as well.

-----Original Message-----
From: bf-committers-bounces at projects.blender.org
[mailto:bf-committers-bounces at projects.blender.org] On Behalf Of Thomas
H. Hendrick
Sent: Friday, December 23, 2005 10:01 AM
To: bf-blender developers
Subject: [Bf-committers] Armatures for beyond Release 2.4

So, I've been wondering -- what is really necessary to define a Bone 
inside Blender?  From the user Perspective, as well as the Python API, a

Bone is defined as { Name, Parent Bone, Head Point, Tail Point, Roll }.

Is there a technical / mathematical reason a Bone could not be defined 
using { Name, Parent Bone, Bone Length, Quaternion from Parent, 
Translation from Parent }?  At least from the standpoint of the Python 
API, this would give the user much more control over rest position of 
the bone.

I was perhaps thinking the Python API for Editbone could be augmented to

include (quick-example):
setLength( float len )
setRestLocation( Vector trans )
setRestQuaternion( Quaternion q )

Just a thought.  Thanks for all the hard work put in on the 2.4 release!


Tom Hendrick<thomas.hendrick at vistagy.com>                Technical Staff
[W] 1-(781)-290-0506 x252   [M] 1-(617) 448-2585    [H] 1-(978)-244-1149
Vistagy, Inc.                                    http://www.vistagy.com/

More information about the Bf-committers mailing list