[Bf-python] Re: Bf-python Digest, Vol 17, Issue 20

Tron Thomas tron.thomas at verizon.net
Fri Dec 23 23:31:20 CET 2005


I'm used to thinking of bones and joints in terms of quaternions and 
locations.  That's how I dealt with bones when I was writing an exporter 
for Blender 2.37.  I'm not sure how this vector/roll stuff is supposed 
to work.  I guess as long as it is documented well enough, it will make 
sense.

>---------------------------------------------------------------------
>
>Message: 1
>Date: Fri, 23 Dec 2005 10:19:19 -0500
>From: "Gilbert, Joseph T." <jgilbert at tigr.ORG>
>Subject: [Bf-python] RE: [Bf-committers] Armatures for beyond Release
>	2.4
>To: <thomas.hendrick at vistagy.com>,	"bf-blender developers"
>	<bf-committers at projects.blender.org>
>Cc: Blender Foundation Python list <bf-python at projects.blender.org>
>Message-ID:
>	<7F0AA25C9B1706448E8B73DFDD109B3102407F7A at EXCHANGE.TIGR.ORG>
>Content-Type: text/plain;	charset="us-ascii"
>
>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.
>
>  
>





More information about the Bf-python mailing list