createAssetPayload#

Fully qualified name: usdex::core::createAssetPayload

pxr::UsdStageRefPtr usdex::core::createAssetPayload(
pxr::UsdStagePtr stage,
const std::string &format = "usda",
const pxr::SdfLayer::FileFormatArguments &fileFormatArgs = pxr::SdfLayer::FileFormatArguments(),
)#

Create a relative layer within a getPayloadToken() subdirectory to hold the content of an asset.

This layer represents the root layer of the Payload that the Asset Interface targets.

This entry point layer will subLayer the different Content Layers (e.g., Geometry, Materials, etc.) added via addAssetContent().

Note

This function does not create an actual Payload, it is only creating a relative layer that should eventually be the target of a Payload (via addAssetInterface()).

Parameters:
  • stage – The stage’s edit target identifier will dictate where the relative payload layer will be created

  • format – The file format extension (default: “usda”)

  • fileFormatArgs – Additional file format-specific arguments to be supplied during stage creation.

Returns:

The newly created relative payload layer opened as a new stage. Returns an invalid stage on error.