How to get the path of payload by prim in code?

Does anyone know the way to get the path of payload, or example like this ?

Thanks !



import omni.usd

# get stage
stage = omni.usd.get_context().get_stage()

# get prim in stage
prim = stage.GetPrimAtPath("/World/racks")

# get prim's ref data, use prim.GetMetadata("references) if it's a reference
refs = prim.GetMetadata("payload").ApplyOperations([])

# print asset path of the reference/payload
for ref in refs:
1 Like

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