configureStage#
Fully qualified name: usdex::core::configureStage
- bool usdex::core::configureStage(
- pxr::UsdStagePtr stage,
- const std::string &defaultPrimName,
- const pxr::TfToken &upAxis,
- const double linearUnits,
- const double massUnits,
- std::optional<std::string_view> authoringMetadata = std::nullopt,
Configure a stage so that the defining metadata is explicitly authored.
The default prim will be used as the target of a Reference or Payload to this layer when no explicit prim path is specified. A root prim with the given
defaultPrimNamewill be defined on the stage if one is not already specified. If a new prim is defined then the prim type will be set toScope.The stage metrics of Up Axis, Linear Units and Mass Units will be authored.
The root layer will be annotated with authoring metadata, unless previously annotated. This is to preserve authoring metadata on referenced layers that came from other applications. See SdfLayer Authoring for more details on
setLayerAuthoringMetadata.- Parameters:
stage – The stage to be configured.
defaultPrimName – Name of the default root prim.
upAxis – The up axis for all the geometry contained in the stage.
linearUnits – The meters per unit for all linear measurements in the stage, eg.
UsdGeomLinearUnits::metersmassUnits – The kilograms per unit for all mass measurements in the stage, eg.
UsdPhysicsMassUnits::kilogramsauthoringMetadata – The provenance information from the host application. See SdfLayer Authoring for details.
- Returns:
A bool indicating if the metadata was successfully authored.