unreal.AssetTools
¶
-
class
unreal.
AssetTools
(outer=None, name='None')¶ Bases:
unreal.Interface
Asset Tools
C++ Source:
Module: AssetTools
File: IAssetTools.h
-
create_asset
(asset_name, package_path, asset_class, factory, calling_context='None') → Object¶ Creates an asset with the specified name, path, and factory
- Parameters
- Returns
the new asset or NULL if it fails
- Return type
-
create_asset_with_dialog
(asset_name, package_path, asset_class, factory, calling_context='None') → Object¶ Opens an asset picker dialog and creates an asset with the specified name and path
-
create_unique_asset_name
(base_package_name, suffix) -> (out_package_name=str, out_asset_name=str)¶ Creates a unique package and asset name taking the form InBasePackageName+InSuffix
-
duplicate_asset
(asset_name, package_path, original_object) → Object¶ Creates an asset with the specified name and path. Uses OriginalObject as the duplication source.
-
duplicate_asset_with_dialog
(asset_name, package_path, original_object) → Object¶ Opens an asset picker dialog and creates an asset with the specified name and path. Uses OriginalObject as the duplication source.
-
duplicate_asset_with_dialog_and_title
(asset_name, package_path, original_object, dialog_title) → Object¶ Opens an asset picker dialog and creates an asset with the specified name and path. Uses OriginalObject as the duplication source. Uses DialogTitle as the dialog’s title.
-
export_assets_with_dialog
(assets_to_export, prompt_for_individual_filenames) → None¶ Exports the specified objects to file. First prompting the user to pick an export directory and optionally prompting the user to pick a unique directory per file
-
find_soft_references_to_object
(target_object)¶ Returns list of objects that soft reference the given soft object path. This will load assets into memory to verify
- Parameters
target_object (SoftObjectPath) –
- Returns
referencing_objects (Array(Object)):
- Return type
-
import_asset_tasks
(import_tasks) → None¶ Imports assets using tasks specified.
- Parameters
import_tasks (Array(AssetImportTask)) – Tasks that specify how to import each file
-
import_assets_automated
(import_data)¶ Imports assets using data specified completely up front. Does not ever ask any questions of the user or show any modal error messages
- Parameters
import_data (AutomatedAssetImportData) –
- Returns
list of successfully imported assets
- Return type
-
import_assets_with_dialog
(destination_path)¶ Opens a file open dialog to choose files to import to the destination path.
-
open_editor_for_assets
(assets) → None¶ Opens editor for assets deprecated: Please use UAssetEditorSubsystem::OpenEditorForAssets instead.
-
rename_assets
(assets_and_names) → bool¶ Renames assets using the specified names.
- Parameters
assets_and_names (Array(AssetRenameData)) –
- Returns
- Return type
-
rename_assets_with_dialog
(assets_and_names, auto_checkout=False) → AssetRenameResult¶ Renames assets using the specified names.
- Parameters
assets_and_names (Array(AssetRenameData)) –
auto_checkout (bool) –
- Returns
- Return type
-
rename_referencing_soft_object_paths
(packages_to_check, asset_redirector_map) → None¶ Function that renames all FSoftObjectPath object with the old asset path to the new one.
- Parameters
packages_to_check (Array(Package)) – Packages to check for referencing FSoftObjectPath.
asset_redirector_map (Map(SoftObjectPath, SoftObjectPath)) – Map from old asset path to new asset path