open(_:sessionLayer:options:)
Opens a stage using a file as the root layer.
Declaration
static func open(_ path: FilePath, sessionLayer: USDLayer? = nil, options: USDStage.OpenOptions = []) throws -> USDStageDiscussion
Recursively follows the composition rules described by the root layer, opening any files referenced by that layer and assembling a hierarchy of USDPrims from the combined contents of all layers.
This function will not create a file if no file exists at path, unless OpenOptions.createNew is passed as an option.
This function creates a new, independent stage object even if there is already a stage opened with path as its root layer.
Parameters:
path: A file to use as the root layer of the new stage.
sessionLayer: A layer to use as a session layer. If
nil, an anonymous layer will be created.options: Options that specify behavior related to opening a stage.
Throws: An error if path does not exist or could not be read.