/
Parsing atoms objects

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 

Related content

Iterating through the agents of an agent group
Iterating through the agents of an agent group
Read with this
Access agent data (AtomsUnreal)
Access agent data (AtomsUnreal)
More like this
Examples
Read with this
Reading the world joint matrices of an agent
Reading the world joint matrices of an agent
More like this
Metadata
Read with this
Creating agent types
Creating agent types
More like this

Copyright © 2017, Toolchefs LTD.