As you can see in this picture, I want to make an extension which can display the collected Mesh’s information in Properties, like the coordinates or the distance from other object.
The question is that I don’t know which parameter is what I want and which function used to exported it, is there some documentation? Or someone give me a script example?
I’d recommend starting with the USD DLI course to learn more if you haven’t delved too deep into USD yet: Courses – NVIDIA
As an easy way to get started, you can hover over the property labels to get their USD attribute names.
When you’ve identified a property that you want to query, you can do something like this:
import omni.usd stage = omni.usd.get_context().get_stage() light = stage.GetPrimAtPath("/World/defaultLight") # Get and print the "Rotate" property values print(light.GetAttribute("xformOp:rotateXYZ").Get()) # Get and print the "Color Tempterature" property values print(light.GetAttribute("colorTemperature").Get())
Thank you very much, and I will learn more through the Courses!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.