The code like this:
def getAnimation(self,
actor="models/c_a_b_body",
animation="models/c_a_b_body-run",
jointList=["Hip","Spine","Ribcage","Neck","Head",
"Shoulder.L","Upperarm.L","Forearm.L","Hand.L","Finger_B.L","Pinger_A.L",
"Shoulder.R","Upperarm.R","Forearm.R","Hand.L","Finger_B.R","Pinger_A.R",
"Thigh.L","Shin.L","Foot.L","Toe.L",
"Thigh.R","Shin.R","Foot.R","Toe.R"]):
actor = Actor(actor,{'animation':animation})
# 获得总帧数
totel = actor.getNumFrames('animation')
returnList = []
for i in range(0,totel):
# 停在某一帧
actor.pose('animation',i)
newTable = {}
for j in jointList:
NodePath = actor.controlJoint(None,"modelRoot",j)
newTable[j] = (NodePath.getPos(),NodePath.getHpr(),NodePath.getScale())
returnList.append(newTable)
return returnList
But each newTable are exactly same, because pose() does not work.