If I have an armature:
bpy.data.armatures["Armature"]
which consists of a chain of bones:
Bone->Bone.001->Bone.002
How do I get to the various bones in the armature. For example, how would I get to the middle bone (Bone.002), select the head of that bone, and extrude another bone from the head of Bone.002?
All I see when I list
bpy.data.armatures["Armature"].bones
is
...bones["Bone"]
how do I get to Bone.002 etc...
How to extrude (with x axis mirror) head of armature
Moderators: jesterKing, stiv
-
- Posts: 0
- Joined: Thu Mar 29, 2012 6:26 am
bpy.data.armatures['Armature'].bones['Bone.002']
if you just added it, switch from edit to object mode or it will not exist!
You can also use children / parent properties, in console for testing e.g.:
bpy.data.armatures['Armature'].bones['Bone'].children[:]
if you just added it, switch from edit to object mode or it will not exist!
You can also use children / parent properties, in console for testing e.g.:
bpy.data.armatures['Armature'].bones['Bone'].children[:]
I'm sitting, waiting, wishing, building Blender in superstition...
-
- Posts: 0
- Joined: Thu Mar 29, 2012 6:26 am
2 more related questions:
It sounds like EDIT mode maybe makes a copy of actual mesh data and all modifications are to the copy until switching back out of EDIT mode? Is there any good documentation which explains this process?
If I extrude a seoncd bone "Bone2" from the head of "Bone" they are at the same level, so cannot get from one to the other with parent /child relationship, yet they are related (siblings). Is there any way to see the "siblings" of a bone (other bones extruded from the head of that bone)?
It sounds like EDIT mode maybe makes a copy of actual mesh data and all modifications are to the copy until switching back out of EDIT mode? Is there any good documentation which explains this process?
If I extrude a seoncd bone "Bone2" from the head of "Bone" they are at the same level, so cannot get from one to the other with parent /child relationship, yet they are related (siblings). Is there any way to see the "siblings" of a bone (other bones extruded from the head of that bone)?
http://www.blender.org/documentation/bl ... bone-bones
no, there's no easy way to determine "siblings" for your special case, you should add a parent for them. Otherwise you have 3 root bones, which can't even be connected, if you select and grab one of the root bones, they will move without affecting the other root bones. So there is in fact no relationship. You could walk through all bones via script and check the head/tail locations and infer the relationship "sibling", but would work only if the root heads remained in same location.
no, there's no easy way to determine "siblings" for your special case, you should add a parent for them. Otherwise you have 3 root bones, which can't even be connected, if you select and grab one of the root bones, they will move without affecting the other root bones. So there is in fact no relationship. You could walk through all bones via script and check the head/tail locations and infer the relationship "sibling", but would work only if the root heads remained in same location.
I'm sitting, waiting, wishing, building Blender in superstition...