Set the Stage Linear Units

You can set the metersPerUnit metadata on the stage using UsdGeom.SetStageMetersPerUnit to define the linear units of the stage. Convenience shortcuts for units are scoped in UsdGeom.LinearUnits (e.g. UsdGeom.LinearUnits.meters is 1.0 metersPerUnit)

Note

Fallback stage linear units are centimeters (0.01).

Warning

Existing objects will not be automatically scaled to adapt to the stage linear units. Learn more about stage linear units.

USD API

from pxr import UsdGeom


# Set stage linear units to meters.
# Any double-precision float can be used for metersPerUnit.
UsdGeom.SetStageMetersPerUnit(stage, UsdGeom.LinearUnits.meters)