I am using blender 2.56, which uses Python 3.1, and am working on a script
to build a skeleton. Problem I have is that after I switch the direction
of an armature, I then try to do an extrude, but the extrude occurs at
BOTH ends of the armature. So I need a way to select the tip, root, or
body of the armature . . .
bpy.ops.object.armature_add()
bpy.data.objects[“Armature”].location.z = 7.7 #8.6
bpy.ops.object.editmode_toggle()
bpy.ops.armature.extrude()
bpy.ops.transform.translate(value=(0.0, 0.1, 0.92))
bpy.ops.armature.select_hierarchy()
bpy.ops.armature.select_hierarchy()
bpy.ops.armature.switch_direction()
bpy.ops.armature.extrude(forked=False)
bpy.ops.transform.translate(value=(1.0, 0.0, 0.0))
bpy.ops.armature.extrude(forked=False)
When I try to do this:
>>>bpy.data.armatures[“Armature”].bones[“Bone.003”].select_tail=True
>>>bpy.data.armatures[“Armature”].bones[“Bone.003”].select_head=False
If will not work. I have tried many other ideas, but am not able to find a way
to select the tip, head or tail of the bone. As best I can tell, the functionality
as listed in the previous two lines of code just does not exist, or I am just
using the wrong syntax.
“Time is the fire in which we burn.” Gene Roddenberry