Moderator: joepal
#Set to Tpose
def setTpose():
import animation
import bvh
human = G.app.selectedHuman
filepath = 'C:/MakeHuman/Source/MakeHuman/makehuman/data/poses/tpose.bvh'
bvh_file = bvh.load(filepath, convertFromZUp="auto")
anim = bvh_file.createAnimationTrack(human.getBaseSkeleton())
human.addAnimation(anim)
human.setActiveAnimation(anim.name)
human.refreshPose()
return
#Rotate bones
def rotateBone():
import animation
import random
from core import G
human = G.app.selectedHuman
skeleton = human.getSkeleton()
my_bone_name = 'neck01'
my_bone =skeleton.getBone(my_bone_name)
my_bone.rotate(45, 0, False)
anim = animation.Pose("Test", skeleton.getPose())
human.addAnimation(anim)
human.setActiveAnimation(anim.name)
human.setToFrame(0)
return
Users browsing this forum: Google [Bot] and 1 guest