[Bf-committers] Python bone.roll bugfix and dof bindings

Gilbert, Joseph T. jgilbert at tigr.ORG
Mon Jun 19 16:00:22 CEST 2006


This should be posted on the bug tracker if it is not already.  

-----Original Message-----
From: bf-committers-bounces at projects.blender.org
[mailto:bf-committers-bounces at projects.blender.org] On Behalf Of Alberto
Torres
Sent: Sunday, June 18, 2006 12:42 AM
To: bf-committers at projects.blender.org
Subject: [Bf-committers] Python bone.roll bugfix and dof bindings

Hello,
I fixed a bug that made me crazy while I was making a python script.

Select an armature and get the roll value in editmode
arm=Blender.GetSelected()[0].getData()
arm.makeEditable()
print arm.bones['Bone'].roll
(always getting something like -4.12342341324e-44)

Without makeEditable() I was getting the correct value, but I later
discovered that the bindings are different in editmode. The binding
for roll was buggy. I've attached a patch.

I also needed to access all DoF (degrees of freedom, not depth of
field) values. There are already limitMin and limitMax.
I added stiffness, ikstretch, lock x/y/z and limit x/y/z. I
implemented the last two as arrays of booleans (dofLock and dofLimit),
also accepting arrays of integers (i.e. [True,False,True] or [1,0,1]).

I knew nothing about python one week ago, but I made my first script
(dealing with armatures and constraints), then I made my first blender
patch and ended up hacking blender code to suit my needs. Am I
becoming addicted to this?

Although cvs was feature frozen last Tuesday, I think my code is good
enough to be included in the next Blender release.

Best regards
--
Alberto Torres Ruiz (a.k.a. DiThi)
e-mail: kungfoobar at gmail.com
Jabber ID: dithi at jabber.org


More information about the Bf-committers mailing list