how to get usd dimensions in code?
Hi,
do you mean the meters per unit of a USD stage, thats defining the dimension. You can get it like this:
from pxr import UsdGeom
stage = omni.usd.get_context().get_stage()
metersPerUnit = UsdGeom.GetStageMetersPerUnit(stage)
Regads,
Ales
![7$013@YVGSN4IR0YWMBU~`E|671x193](upload://2c1K4Qs0R6QIl6j3JB830a5yCd1.png)
I want to obtain this attribute
Finally, I used to `.GetAttribute(‘extent’)` obtain the data, but I’m not sure if it’s the best method
Ah I see, yes you can get it like this:
cExtent = UsdGeom.Boundable(prim).GetExtentAttr().Get()
Ales
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.