[Bf-python] Two things regarding armature

Joseph Gilbert models at paposo.com
Wed May 12 01:56:06 CEST 2004


Hi there,
    Thanks!
    The setFlag and getFlag were sorta hacks. The flag member of Bone is
sortof the dust bin of the class - where a number of selection/deselection,
ik, misc. flags went (anyway it seems to me to be that way). The bone class
will need to incorporated a few more items still. Among these are support
for constraints, IK, bone matrix access, etc. I was playing with the idea of
having a function deal with the boneclass (head, foot, etc.) but it didn't
seem too useful. If you think this is a good idea then maybe we need a
boneclass accessor.
    As for the NLA and setPose I put up the a set of python API docs here:
http://www.paposo.com/pythonAPI233a/ If you go to the Bone section there is
some code that outlines a pose setting routine. The NLA module follows that
code up with some functions for accessing the actions of an object/armature.
Basically with poses this is the idea:
1. you need to create a set of bones, then create an armature
2. add the bones to the armature
3. link the armature datablock to an object<armature type> (this is
important because the pose is added to an action which is linked to the
object - not the armature)
4. set the current frame (this is the time location for the pose)
5. then call setPose() on one of the bones in the armature.
6. repeat steps 4 and 5 for other bones/frames

setPose() currently takes a list of constants which are: SIZE, LOC, ROT -
these determine what Ipo curves to add for the posekey, and an optional
Action type.
  -----Original Message-----
  From: bf-python-admin at blender.org [mailto:bf-python-admin at blender.org]On
Behalf Of Michael Schardt
  Sent: Tuesday, May 11, 2004 6:16 AM
  To: bf-python at blender.org
  Subject: [Bf-python] Two things regarding armature


  Hi all!

  Fist of all - thanks for the good work! Python support for armature is
really good now... But one question: There were once (experimental?)
functions to access bone-attributes: bone.getFlag() and bone.setFlag(). I
used them to query (and set) IK and bonetype. What happened to these
functions? Any plans to incorporate them back again?
  And another thing: Now there's a new module NLA to create actions and a
function bone.setPose. I can't get them to work (and unfortunately there's
no documentation available at the moment). Can anyone post a simple example
how to create a pose for an armature with these functions?
  Thanks for your help!

  Greetings, Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20040511/0ad9a2aa/attachment.html>


More information about the Bf-python mailing list