How to get the 'Meters Per Unit' attribute in the layer proparty window from my extention

Hello, I would like to get reference to the ‘Meters Per Unit’ attribute in the layer property window from my extention

thank you

@danielle.sisserman this worked for me, but there are probably other ways of going about it:

import omni.usd
from pxr import Usd, Sdf, UsdGeom

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

# get and print meters per unit setting of the current stage
mpu = UsdGeom.GetStageMetersPerUnit(stage)
print (mpu)

here’s the doc that may provide additional information on stage units:


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