Created
January 21, 2022 20:16
-
-
Save spatial-bit/d89f4cc7d861ffb69697a491de82f320 to your computer and use it in GitHub Desktop.
USD Reading transforms/animations from a stage #USD #OMNIVERSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pxr import UsdGeom, Usd | |
stage_path = "D:\\Source\\internal\\projects\\example_simgen\\input\\stage_xxx2usd.usda" | |
stage = Usd.Stage.Open(stage_path) | |
prim_path = "/stage/Device_rig" | |
tx_prop = UsdGeom.Xform.Get(stage, prim_path) | |
times = tx_prop.GetTimeSamples() | |
transforms = [] | |
for time in times: | |
transforms.append(tx_prop.GetLocalTransformation(time=time)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment