unreal.UsdStageEditorLibrary
¶
- class unreal.UsdStageEditorLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Library of functions that can be used from scripting to interact with the USD Stage Editor UI
C++ Source:
Plugin: USDImporter
Module: USDStageEditor
File: USDStageEditorBlueprintLibrary.h
- classmethod actions_import(output_content_folder, options) None ¶
Imports the currently opened USD Stage into persistent UE assets, actors and components on the level. Corresponds to the “Actions -> Import” action on the USD Stage Editor menu bar. papam: Options - Options object to use for the import.
- Parameters:
output_content_folder (str) – Content path (e.g. “/Game/Imports”) to receive the imported assets. If this path is the empty string a dialog will be shown to let the user pick the folder.
options (UsdStageImportOptions) –
- classmethod close_stage_editor() bool ¶
Closes the USD Stage Editor window if it is opened. Does nothing in case it is already closed.
- Returns:
True if a stage was closed by this action.
- Return type:
- classmethod export_selected_layers(output_directory) None ¶
Exports the currently selected layers on the USD Stage Editor to brand new files in a new location. Corresponds to right-clicking selected layers on the USD Stage Editor and picking “Export”.
- Parameters:
output_directory (str) – Directory path (e.g. “C:/ExportFolder/”) to receive the exported files. If this path is the empty string a dialog will be shown to let the user pick the directory.
- classmethod file_close() None ¶
Closes the currently opened USD Stage (by clearing the attached Stage Actor’s RootLayer property). Corresponds to the “File -> Close” action on the USD Stage Editor menu bar.
- classmethod file_export_all_layers(output_directory) None ¶
Exports all layers of the currently opened USD Stage to brand new files in a new location. Corresponds to the “File -> Export -> All Layers” action on the USD Stage Editor menu bar.
- Parameters:
output_directory (str) – Directory path (e.g. “C:/ExportFolder/”) to receive the exported files. If this path is the empty string a dialog will be shown to let the user pick the directory.
- classmethod file_export_flattened_stage(output_layer) None ¶
Exports the currently opened USD Stage to a single “flattened” USD layer. Corresponds to the “File -> Export -> All Layers” action on the USD Stage Editor menu bar.
- Parameters:
output_layer (str) – File path (e.g. “C:/ExportFolder/out.usda”) to export the flattened layer to. If this path is the empty string a dialog will be shown to let the user pick the file.
- classmethod file_new() None ¶
Creates a new memory-only layer and opens an USD Stage with that layer as its root. Corresponds to the “File -> New” action on the USD Stage Editor menu bar.
- classmethod file_open(file_path) None ¶
Opens an USD Stage from a file on disk. Corresponds to the “File -> Open” action on the USD Stage Editor menu bar.
- Parameters:
file_path (str) – File path to the USD layer to open (e.g. “C:/Folder/MyFile.usda”). If this path is the empty string a dialog will be shown to let the user pick the file.
- classmethod file_reload() None ¶
Reloads all layers of the current USD Stage. Corresponds to the “File -> Reload” action on the USD Stage Editor menu bar.
- classmethod file_reset() None ¶
Resets the state of the current USD Stage (which layers are muted, the current edit target, etc.). Corresponds to the “File -> Reset state” action on the USD Stage Editor menu bar.
- classmethod file_save(output_file_path_if_unsaved) None ¶
Saves the currently opened USD Stage back to disk, or to a new file in case it hasn’t been saved yet. Corresponds to the “File -> Save” action on the USD Stage Editor menu bar.
- Parameters:
output_file_path_if_unsaved (str) – File path (e.g. “C:/Folder/MyFile.usda”) to use when the currently opened stage hasn’t been saved yet. If this path is the empty string a dialog will be shown to let the user pick the file.
- classmethod get_attached_stage_actor() UsdStageActor ¶
Gets which actor is currently attached to the USD Stage Editor, if any. May return nullptr in case no actor is attached.
- Returns:
The attached stage actor.
- Return type:
- classmethod get_selected_layer_identifiers() Array[str] ¶
Returns the full identifiers of all layers that are currently selected on the USD Stage Editor.
- classmethod get_selected_prim_paths() Array[str] ¶
Returns the full paths to all prims currently selected on the USD Stage Editor.
- classmethod get_selected_property_names() Array[str] ¶
Returns the names of the currently selected properties on the right panel of the USD Stage Editor.
- classmethod open_stage_editor() bool ¶
Opens the the USD Stage Editor window, or focus it in case it is already open.
- Returns:
True if a stage is now opened and available.
- Return type:
- classmethod set_attached_stage_actor(new_actor) bool ¶
Sets which actor is currently attached to the USD Stage Editor. Provide None/nullptr to clear the attached stage actor.
- Parameters:
new_actor (UsdStageActor) – The actor to select
- Returns:
True in case the new actor was attached to the USD Stage Editor.
- Return type:
- classmethod set_selected_layer_identifiers(new_selection) None ¶
Sets the USD Stage Editor layer selection to all occurences of the layers with identifiers in NewSelection. Provide an empty array to clear the selection.
- classmethod set_selected_prim_paths(new_selection) None ¶
Sets the USD Stage Editor prim selection to the prims with paths contained in NewSelection. Provide an empty array to clear the selection.