Blender2.5でBoneいじるスクリプト

なかなか情報なくて探すの苦労した・・・

bpy.data.armatures["Armature"].edit_bones["Bone"].head.xyz = Vector((1,1,1))
bpy.data.armatures["Armature"].edit_bones["Bone"].tail.xyz = Vector((1,1,1)) 

ゲームエンジンの場合 

import bpy,bge
 
# To get the controller thats running this python script:
cont = bge.logic.getCurrentController() # bge.logic is automatically imported
 
# To get the game object this controller is on:
obj = cont.owner
for chan in obj.channels:
    chan.rotation_mode = 1
 
 
obj.channels["Bone"].joint_rotation = (0.1,0.2,0.3)
obj.channels["Bone.001"].joint_rotation = (0.1,1,1)
obj.channels["Bone.002"].joint_rotation = (0.1,1,4)
obj.update()