<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff size=2>Hi 
there,</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004>    <FONT face=Arial 
color=#0000ff size=2>Thanks! </FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff 
size=2>    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. </FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004>    <FONT face=Arial 
color=#0000ff size=2>As for the NLA and setPose I put up the a set of python API 
docs here:   <A 
href="http://www.paposo.com/pythonAPI233a/">http://www.paposo.com/pythonAPI233a/</A> 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.</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff 
size=2>Basically with poses this is the idea:</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff size=2>1. you 
need to create a set of bones, then create an armature</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff size=2>2. add 
the bones to the armature</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff size=2>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)</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff size=2>4. set 
the current frame (this is the time location for the pose)</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff size=2>5. 
then call setPose() on one of the bones in the armature. </FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff size=2>6. 
repeat steps 4 and 5 for other bones/frames</FONT></SPAN></DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=212034223-11052004><FONT face=Arial color=#0000ff 
size=2>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. </FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> bf-python-admin@blender.org 
  [mailto:bf-python-admin@blender.org]<B>On Behalf Of </B>Michael 
  Schardt<BR><B>Sent:</B> Tuesday, May 11, 2004 6:16 AM<BR><B>To:</B> 
  bf-python@blender.org<BR><B>Subject:</B> [Bf-python] Two things regarding 
  armature<BR><BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>Hi all!</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>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?</FONT></DIV>
  <DIV><FONT face=Arial size=2>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? </FONT></DIV>
  <DIV><FONT face=Arial size=2>Thanks for your help!</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>Greetings, Michael</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>