/
Reading the world joint matrices of an agent

Reading the world joint matrices of an agent

Maya

from AtomsMaya.hostbridge.atomsgroup import MayaAtomsGroupHostBridge
import AtomsCore

# the shape name of the agent group
ag_name = "AgentGroupName"
 
ag = MayaAtomsGroupHostBridge()
ag.set_app_obj(ag_name)

ag = ag.get_agent_group()

# we are using the first agent only
a = ag.agents()[0]
poser = AtomsCore.Poser(a.agentType().skeleton())

wm = poser.getAllWorldMatrix(a.pose())
for w in wm:
	# printing the translation of the joints
    print(w.translation())




Houdini

from AtomsHoudini.hostbridge.atomsgroup import HoudiniAtomsGroupHostBridge
import AtomsCore

# the full path of the agent group
ag_name = "/obj/AgentGroupName"
 
ag = HoudiniAtomsGroupHostBridge()
ag.set_app_obj(ag_name)

ag = ag.get_agent_group()

# we are using the first agent only
a = ag.agents()[0]
poser = AtomsCore.Poser(a.agentType().skeleton())

wm = poser.getAllWorldMatrix(a.pose())
for w in wm:
	# printing the translation of the joints
    print(w.translation())

Related content

Metadata
Read with this
Iterating through the agents of an agent group
Iterating through the agents of an agent group
More like this
Agent Aim
Read with this
Access agent data (AtomsUnreal)
Access agent data (AtomsUnreal)
More like this
State machine debugger data
State machine debugger data
More like this
Creating agent groups
Creating agent groups
More like this

Copyright © 2017, Toolchefs LTD.