Parsing atoms objects
import Atoms import AtomsCore from Atoms import GLOBAL_NAMES #agent type agentType = Atoms.AgentTypes.instance().agentType("atomsRobot") skeleton = agentType.skeleton() print skeleton.numJoints() metadata = agentType.metadata() print metadata.keys() #agent joint matrix agent = Atoms.AgentsPool.instance().agent(0) # 0 is the global agent id pose = agent.pose() poser = AtomsCore.Poser(agent.agentType().skeleton()) joint10Matrix = poser.getWorldMatrix(pose,10) print joint10Matrix # animation clip clips = Atoms.AnimationClips.instance() clip = clips.animationClip("atomsRobotWalk") jointIndex = 0 jointPose = clip[jointIndex] frame = 10 translation = jointPose.getTranslation(frame) pelvisVelocity = jointPose.getArrayMetadataAtFrame(GLOBAL_NAMES.JOINT.PELVIS_VELOCITY, frame).get() print pelvisVelocity
Copyright © 2017, Toolchefs LTD.