[Bf-python] Armature : in Class editBone there is no variable "children"

Joseph Gilbert jgilbert at tigr.ORG
Mon Dec 18 16:09:11 CET 2006


Sorry, the armature building code is better for gui's than scripting.

You can get the parent/child relationship from the bones before entering  
editmode as campell has suggested. If that's not the case than someone  
should go ahead and add the read-only attribute.

On Mon, 18 Dec 2006 09:45:33 -0500, Campbell Barton <cbarton at metavr.com>  
wrote:

>
> adding ob.children has been discussed before. for read only it could be  
> generated each time it was used (would not be that optimal)
>
> but for armatures its not so bad since there useually arnt 1000+ bones  
> in 1 armature.
>
> even so, using dicts you can get the bone children, see bvh import,
>
>
> Joseph Gilbert wrote:
>> Has to do with how armatures are built internally.
>>
>> Editbones have only a 1-way linkage: to the parent. Editbones exist as  
>> a 'list' of objects with parent fields. When you call the method to  
>> make the armature, all the parent-child relationships are established.
>>
>> Because python is wrapping the temporary editbone structure directly  
>> there is no direct access to a child or children field. Once the  
>> armature is built from the editbones, the bones are populated with  
>> updated data, 2-way parenting is established, and the editbones are  
>> invalidated.
>>
>> You could set 'child/children' through the python api, but it wouldn't  
>> be used by the internal code to build the armature.
>>
>> On Wed, 13 Dec 2006 11:02:18 -0500, <jmsoler at free.fr> wrote:
>>
>>> Hi,
>>>
>>> Armature :
>>> in  the  EditBone class , there is no "children"  variable :
>>> http://www.zoo-logique.org/3D.Blender/scripts_python/API/Armature.Editbone-class.html  
>>> but in the Bone class, both "parent" and "children" exist :
>>> http://www.zoo-logique.org/3D.Blender/scripts_python/API/Armature.Bone-class.html  
>>> Is it just a missing variable or is there a good reason for this ?
>>> Regards, jms
>>>
>>> (sorry if this message is posted twice)
>>>
>>>
>>> _______________________________________________
>>> Bf-python mailing list
>>> Bf-python at projects.blender.org
>>> http://projects.blender.org/mailman/listinfo/bf-python
>>
>>
>>
>
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Bf-python mailing list