Python for MotionBuilder

# 強制的にTposeにするよ
# *- coding: utf-8 -*-
from pyfbsdk import *
 
NameArray = [
"Root",
"Hips",
"Spine",
"Spine1",
"Spine2",
"Spine3",
"Neck",
"Neck1",
"Head",
"HeadEnd",
"LeftShoulder",
"LeftArm",
"LeftForeArm",
"LeftHand",
"RightShoulder",
"RightArm",
"RightForeArm",
"RightHand",
"LeftUpLeg",
"LeftLeg",
"LeftFoot",
"LeftToeBase",
"LeftToeEnd",
"RightUpLeg",
"RightLeg",
"RightFoot",
"RightToeBase",
"RightToeEnd",
"hand",
"palm",
"indexA",
"indexB",
"indexC",
"indexD",
"middleA",
"middleB",
"middleC",
"middleD",
"ringA",
"ringB",
"ringC",
"ringD",
"littleA",
"littleB",
"littleC",
"littleD"
]
 
for i in FBSystem().Scene.Components:
    for j in NameArray:
        if i.Name == j:
            try :
                i.Rotation.GetAnimationNode().KeyAdd(FBTime(0,0,0,0), [0, 0, 0])
                print "-----OK------"
                print i
                break
            except :
                print "----Error----"
                print i