unreal.EditorLoadingAndSavingUtils
¶
- class unreal.EditorLoadingAndSavingUtils(outer=None, name='None')¶
Bases:
unreal.Object
This class is a wrapper for editor loading and saving functionality It is meant to contain only functions that can be executed in script (but are also allowed in C++). It is separated from FEditorFileUtils to ensure new easier to use methods can be created without breaking FEditorFileUtils backwards compatibility However this should be used in place of FEditorFileUtils wherever possible as the goal is to deprecate FEditorFileUtils eventually
C++ Source:
Module: UnrealEd
File: FileHelpers.h
- classmethod export_scene(export_selected_actors_only) → None¶
Exports the current scene
- Parameters
export_selected_actors_only (bool) –
- classmethod get_dirty_content_packages()¶
Appends array with all currently dirty content packages.
- classmethod get_dirty_map_packages()¶
Appends array with all currently dirty map packages.
- classmethod import_scene(filename) → None¶
Imports a file such as (FBX or obj) and spawns actors f into the current level
- Parameters
filename (str) –
- classmethod load_map(filename) → World¶
Loads the specified map. Does not prompt the user to save the current map.
- classmethod load_map_with_dialog() → World¶
Prompts the user to save the current map if necessary, the presents a load dialog and loads a new map if selected by the user.
- Returns
- Return type
- classmethod new_map_from_template(path_to_template_level, save_existing_map) → World¶
New Map from Template
- classmethod reload_packages(packages_to_reload, interaction_mode=ReloadPackagesInteractionMode.INTERACTIVE) -> (out_any_packages_reloaded=bool, out_error_message=Text)¶
Helper function that attempts to reload the specified top-level packages.
- Parameters
packages_to_reload (Array(Package)) – The list of packages that should be reloaded
interaction_mode (ReloadPackagesInteractionMode) – Whether the function is allowed to ask the user questions (such as whether to reload dirty packages)
- Returns
out_any_packages_reloaded (bool): True if the set of loaded packages was changed
out_error_message (Text): An error message specifying any problems with reloading packages
- Return type
tuple
- classmethod save_current_level() → bool¶
Saves the active level, prompting the use for checkout if necessary.
- Returns
true on success, False on fail
- Return type
- classmethod save_dirty_packages(save_map_packages, save_content_packages) → bool¶
Looks at all currently loaded packages and saves them if their “bDirty” flag is set. Assume all dirty packages should be saved and check out from source control (if enabled).
- classmethod save_dirty_packages_with_dialog(save_map_packages, save_content_packages) → bool¶
Looks at all currently loaded packages and saves them if their “bDirty” flag is set. Prompt the user to select which dirty packages to save and check them out from source control (if enabled).
- classmethod save_packages(packages_to_save, only_dirty) → bool¶
Save all packages. Assume all dirty packages should be saved and check out from source control (if enabled).