[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/include butspace.h blender/source/blender/src buttons_object.c blender/source/blender/python/api2_2x Constraint.c Constraint.h Blender.c Object.c Pose.c blender/source/blender/python/api2_2x/doc Constraint.py API_intro.py ...

Toni Alatalo antont at kyperjokki.fi
Tue May 9 03:46:05 CEST 2006


On Tuesday 09 May 2006 04:06, malefico andauer wrote:
> if we just iterate around the bones in an armature and
> get the constraints each bone has ? Don't really get
> what the poses mean and why this is the way to access

i have not had a chance to look at that module yet, but AFAIK usually in 
Blender pose refers to the .. pose an armature object currently has. i.e. how 
the bones are. this may result from e.g. applying a certain (key)frame from 
an action to the object, myarmature.poseFromAction(myaction, 12). so poses 
have corresponding data than actions, i.e. bone channel values, but a pose is 
only the current thing the armature is in (like a single key in an action for 
that armature, but only stored in the pose of that armatureobject, and in no 
action)

> pose = Armature.Get('Armature')
> for bonename in pose.bones.keys():

based on what described above, this seems a bit strange to me. i'd call the 
armature an armature, and not a pose :) .. and armatures have bones but i 
dont think that has anything to do with bones directly..

>   for const in bone.constraints:
>     print bone.name,'=>',const.type

i suppose you mean const.name and const.type here,
and at least based on this code it seems that these constraints are bone 
constraints - i dont know how exactly their connection to poses works (a bone 
can have constraints that can limit the possible resulting poses that come 
from applying actions on that armature?)

> AttributeError: 'Bone' object has no attribute
> 'constraints'

ah so perhaps Ken meant this:

ob = Object.Get('Armature')
for bonename in ob.pose.bones.keys():

.. at least in the early Pose type i made in late last year, the way to access 
a Pose was via the armatureobject like that.
                               
> Thanks for any help !

just a couple of guesses, and the first probably a wrong one..
(beforing going back to sleep after having woken up to email a hilarious dream 
just saw to the people that were in it, never usually happens to me :)

> malefico

~Toni

>
>  --- Ken Hughes <khughes at pacific.edu> escribió:
> > khughes (Ken Hughes) 2006/05/07 16:57:58 CEST
> >
> >   Modified files:
> >     blender/source/blender/include butspace.h
> >     blender/source/blender/src buttons_object.c
> >     blender/source/blender/python/api2_2x Blender.c
> > Object.c
> >                                           Pose.c
> >     blender/source/blender/python/api2_2x/doc
> > API_intro.py
> >
> > Object.py Pose.py
> >   Added files:
> >     blender/source/blender/python/api2_2x
> > Constraint.c
> >
> > Constraint.h
> >     blender/source/blender/python/api2_2x/doc
> > Constraint.py
> >
> >   Log:
> >   ===Python API===
> >   New Constraint API.  Constraints are accessible
> > through a "constraints"
> >   attribute in poses and objects.  Would be REALLY
> > NICE for armature users to
> >   pound on this code.
> >
> >   Revision  Changes    Path
> >   1.79      +8 -1
> > blender/source/blender/include/butspace.h
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/inc
>lude/butspace.h.diff?r1=1.78&r2=1.79&cvsroot=bf-blender>
>
> >   1.156     +25 -10
> > blender/source/blender/src/buttons_object.c
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/src
>/buttons_object.c.diff?r1=1.155&r2=1.156&cvsroot=bf-blender>
>
> >   1.82      +3 -1
> > blender/source/blender/python/api2_2x/Blender.c
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/pyt
>hon/api2_2x/Blender.c.diff?r1=1.81&r2=1.82&cvsroot=bf-blender>
>
> >   1.187     +5 -2
> > blender/source/blender/python/api2_2x/Object.c
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/pyt
>hon/api2_2x/Object.c.diff?r1=1.186&r2=1.187&cvsroot=bf-blender>
>
> >   1.11      +9 -26
> > blender/source/blender/python/api2_2x/Pose.c
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/pyt
>hon/api2_2x/Pose.c.diff?r1=1.10&r2=1.11&cvsroot=bf-blender>
>
> >   1.33      +1 -0
>
> blender/source/blender/python/api2_2x/doc/API_intro.py
>
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/pyt
>hon/api2_2x/doc/API_intro.py.diff?r1=1.32&r2=1.33&cvsroot=bf-blender>
>
> >   1.70      +3 -1
> > blender/source/blender/python/api2_2x/doc/Object.py
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/pyt
>hon/api2_2x/doc/Object.py.diff?r1=1.69&r2=1.70&cvsroot=bf-blender>
>
> >   1.4       +3 -0
> > blender/source/blender/python/api2_2x/doc/Pose.py
>
> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/pyt
>hon/api2_2x/doc/Pose.py.diff?r1=1.3&r2=1.4&cvsroot=bf-blender>
>
> > _______________________________________________
> > Bf-blender-cvs mailing list
> > Bf-blender-cvs at projects.blender.org
>
> http://projects.blender.org/mailman/listinfo/bf-blender-cvs
>
>
>
>
>
>
>
> ___________________________________________________________
> 1GB gratis, Antivirus y Antispam
> Correo Yahoo!, el mejor correo web del mundo
> http://correo.yahoo.com.ar
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list