how to get usd dimensions in code?
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)
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()
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.