How to get Translate and Orient

Hello,
Is there a corresponding function that can store the attitude information of the object? Or can Translate and Orient be stored in Recorder?

Hey,
I don’t know about the Recorder but you can easily get the translate and Orient by using this kind of command:

import omni

# Get the stage
stage = omni.usd.get_context().get_stage()
# Get the prim object
prim = stage.GetPrimAtPath("/path/to/prim")
# print all the attributes of the prim
print(prim.GetAttributes())
# print the orient
print(prim.GetAttribute("xformOp:orient").Get())
# print the translation
print(prim.GetAttribute("xformOp:translate").Get())
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.