exportLayer#

Fully qualified name: usdex::core::exportLayer

bool usdex::core::exportLayer(
pxr::SdfLayerHandle layer,
const std::string &identifier,
const std::string &authoringMetadata,
std::optional<std::string_view> comment = std::nullopt,
const pxr::SdfLayer::FileFormatArguments &fileFormatArgs = pxr::SdfLayer::FileFormatArguments(),
)#

Export the given SdfLayer to an identifier with an optional comment.

Note

This does not impact sublayers or any stages that this layer may be contributing to. This is to preserve authoring metadata on referenced layers that came from other applications. See SdfLayer Authoring for more details on setLayerAuthoringMetadata.

Parameters:
  • layer – The layer to be exported.

  • identifier – The identifier to be used for the new layer.

  • authoringMetadata – The provenance information from the host application. See SdfLayer Authoring for details.

  • comment – The comment will be authored in the layer as the SdfLayer comment.

  • fileFormatArgs – Additional file format-specific arguments to be supplied during layer export.

Returns:

A bool indicating if the export was successful.