TA Python Extended Editor API

PythonBPLib

Function Name Description
get_all_property_names Get all property names on the given 'UClass'
get_bool_property Get the bool value of a named bool property on the given object.
set_bool_property Set the value of a named bool property on the given object.
get_string_property Get the value of a named FString property on the given object.
set_string_property Set the value of a named FString property on the given object.
get_float_property Get the value of a named float property on the given object.
set_float_property Set the value of a named float property on the given object.
get_int_property Get the value of a named int property on the given object.
set_int_property Set the value of a named int property on the given object.
get_object_property Get the value of a named UObject property on the given object.
set_object_property Set the value of a named int property on the given object.
get_object_flags Get actors that in specified folder, in World Outliner.
call_function Calling a function by name on given object.
get_all_objects Get all UObject in the 'world'.
get_objects_by_class Get all specified class's UObjects in the 'world'.
get_all_worlds Get all 'worlds' in editor。
get_bp_class_hierarchy_package Get the classes hierarchy of the blueprint instance class.
get_redirectors_destination_object Get the destination object of the Redirector.
fix_up_redirectors_in_folder Fixup all redirector In specified folder
fix_up_redirectors Fix up specified redirectors.
get_selected_assets_paths Get the selected assets paths in content browser
set_selected_assets_by_paths Select specified assets in content browser.
get_selected_folder Get the selected folder's paths in content browser.
set_selected_folder Select specified folder in content browser.
set_folder_color Set the of specified folder's color in content browser.
sync_to_assets Sync Assets in Content Browser.
get_selected_components Get selected components in World Outliner.
create_folder_in_outliner Create new folder in World Outliner.
set_selected_folder_path Sets the folder path for all the selected actors.
delete_folder Delete specified folder in World Outliner.
get_actors_from_folder Get actors that in specified folder, in World Outliner.
rename_folder_in_world Rename the specified path to a new name.
close_editor_for_assets Close all active editors for the supplied asset.
get_all_deps Get all dependencies of specified package path.
get_all_refs Get all referencers of specified package path
get_assets_data_by_package_names Gets asset data for the assets in the packages
get_assets_data_by_class Get AssetDatas for the assets in specified folders and types.
list_assets_by_class Get asset paths(assetData.ObjectPath)for the specified folders and types.
select_none De-select all actors. Does nothing if GEdSelectionLock is true.
select_named_actor Select actor by name(ID Name)
select_component Select specified component of current actor
select_actor Select specified actor.
find_actor_by_name Get actor by name(ID Name) in specified World
find_actors_by_label_name Get actor by Label name(display Name) in specified World
execute_console_command Execute Console Command
exec_python_command Execute Python Command if Python is available
set_anim_blueprint Assign the animBlueprint to the SkeletalMeshComponent, this will clear and re-initializes the anim instance with the new class and sets animation mode to 'AnimationBlueprint'
get_anim_blueprint_generated_class Get the generated class of the animBlueprint
get_blueprint_generated_class Get the generated class of the Blueprint
get_static_mesh_section_info Get the material indexes of specified LOD in static mesh
set_static_mesh_lod_material_id Assign the specified section material in Mesh
message_dialog Open a modal message box dialog
confirm_dialog Open a modal message box dialog with Yes/No/Cancel button.
open_file_dialog Open a files picker dialog.
save_file_dialog Open a save file dialog.
open_directory_dialog Open a directory picker dialog.
get_plugin_base_dir Get the base directory of named plug-in.
set_clipboard_content Set the string content to clipboard
get_clipboard_content Get the string content From clipboard
notification Adds a floating notification
get_all_chameleon_data_paths Get the chameleonData by JSON file path
get_chameleon_data Get the chameleonData by JSON file path
multi_line_trace_at_once_by_profile Trace Multi rays against the world using a specific profile in a gird and return the first blocking hits,
sample_heights Trace rays against the world using a specific profile in a gird and return the first blocking hits,
gc Deletes all unreferenced objects, keeping objects that have any of the passed in KeepFlags set. Will wait for other threads to unlock GC.
pilot_level_actor Moves the viewport camera according to the actors location and rotation
eject_pilot_level_actor Eject the viewport camera
get_pilot_level_actor Get the Pilot actor of current Active viewport
get_level_viewport_camera_info Get the location and rotation of level viewport camera
get_level_viewport_camera_fov None
set_level_viewport_camera_info Set the location and rotation of level viewport camera
set_level_viewport_real_time Set the viewport real-time state.
request_viewport_focus_on_selection Move the editor camera in front of selection.
set_level_viewport_is_in_game_view Set IsInGameView of level view.
set_level_viewport_locked Set Whether showing the exact camera view when locking a viewport to a camera.
get_resource_size Get the size of the object/resource for use in memory tools
spawn_actor_from_object Create an actor and place it in the world editor. The Actor can be created from a Factory, Archetype, Blueprint, Class or an Asset.
spawn_actor_from_class Create an actor and place it in the world editor. Can be created from a Blueprint or a Class.
add_component Create a specified Component for actor.
delete_asset Delete the asset in path.
enable_world_composition Enable World Composition in current level.
export_map Exports the specified actor mesh to .obj file.
diff_assets Compare assets by 3rd compare tools, for instance: p4merge etc..
open_pick_path_dialog Open A 'UE style' Pick Path Dialog
open_new_asset_path_dialog Open A 'UE style' Pick Asset Path Dialog
save_thumbnail Save the Thumbnail of assets to disc.
apply_instance_changes_to_blueprint Apply Instance Changes To Blueprint
get_viewport_pixels Get the raw pixels from first active viewport
viewport_redraw Redraw the first active viewport
update_reflection_capture_preview_shape None
break_soft_object Break the SoftObject content into Array: [AssetPathString, SubPathString]
get_unreal_version Get the Version of Unreal Engine in a map(dict). The keys: ["Major", "Minor", "Patch"]
guid_from_string Generate a Guid instance from Guid value string. The new Guid's value will to the input guid string.

get_all_property_names

Get all property names on the given 'UClass'

unreal.PythonBPLib.get_all_property_names(class_, flag=-1) -> Array(str)
    Get all property names on the given 'UClass'

    Args:
        class_ (type(Class)): The UClass of the Properties you are looking for.
        flag (int32): The EPropertyFlags for filter the Properties, 1 = EPropertyFlags.CPF_Edit, the default value -1 for all properties.

    Returns:
        Array(str): all the property names of the Class.

get_bool_property

Get the bool value of a named bool property on the given object.

unreal.PythonBPLib.get_bool_property(object, property_name) -> bool
    Get the bool value of a named bool property on the given object.

    Args:
        object (Object): The object you want to retrieve a property value from.
        property_name (str): The name of the object's bool property.

    Returns:
        bool: The bool value of property.

set_bool_property

Set the value of a named bool property on the given object.

unreal.PythonBPLib.set_bool_property(object, property_name, new_value) -> bool
    Set the value of a named bool property on the given object.

    Args:
        object (Object): The object you want to set a property value on.
        property_name (str): The name of the object's bool property.
        new_value (bool):

    Returns:
        bool: Whether the property was set.

get_string_property

Get the value of a named FString property on the given object.

unreal.PythonBPLib.get_string_property(object, property_name) -> str
    Get the value of a named FString property on the given object.

    Args:
        object (Object): The object you want to retrieve a property value from.
        property_name (str): The name of the object's FString property.

    Returns:
        str: The string value of property.

set_string_property

Set the value of a named FString property on the given object.

unreal.PythonBPLib.set_string_property(object, property_name, new_value) -> bool
    Set the value of a named FString property on the given object.

    Args:
        object (Object): The object you want to set a property value on.
        property_name (str): The name of the object's FString property.
        new_value (str):

    Returns:
        bool: Whether the property was set.

get_float_property

Get the value of a named float property on the given object.

unreal.PythonBPLib.get_float_property(object, property_name) -> float
    Get the value of a named float property on the given object.

    Args:
        object (Object): The object you want to retrieve a property value from.
        property_name (str): The name of the object's float property.

    Returns:
        float: The float value of property.

set_float_property

Set the value of a named float property on the given object.

unreal.PythonBPLib.set_float_property(object, property_name, new_value) -> bool
    Set the value of a named float property on the given object.

    Args:
        object (Object): The object you want to set a property value on.
        property_name (str): The name of the object's float property.
        new_value (float):

    Returns:
        bool: Whether the property was set.

get_int_property

Get the value of a named int property on the given object.

unreal.PythonBPLib.get_int_property(object, property_name) -> int32
    Get the value of a named int property on the given object.

    Args:
        object (Object): The object you want to retrieve a property value from.
        property_name (str): The name of the object's int property.

    Returns:
        int32: The int value of property.

set_int_property

Set the value of a named int property on the given object.

unreal.PythonBPLib.set_int_property(object, property_name, new_value) -> bool
    Set the value of a named int property on the given object.

    Args:
        object (Object): The object you want to set a property value on.
        property_name (str): The name of the object's int property.
        new_value (int32):

    Returns:
        bool: Whether the property was set.

get_object_property

Get the value of a named UObject property on the given object.

unreal.PythonBPLib.get_object_property(object, property_name) -> Object
    Get the value of a named UObject property on the given object.

    Args:
        object (Object): The object you want to retrieve a property value from.
        property_name (str): The name of the object's UObject property.

    Returns:
        Object: The UObject value of property.

set_object_property

Set the value of a named int property on the given object.

unreal.PythonBPLib.set_object_property(object, property_name, new_value) -> bool
    Set the value of a named int property on the given object.

    Args:
        object (Object): The object you want to set a property value on.
        property_name (str): The name of the object's UObject property.
        new_value (Object):

    Returns:
        bool: Whether the property was set.

get_object_flags

Get actors that in specified folder, in World Outliner.

unreal.PythonBPLib.get_object_flags(object) -> int32
    Get actors that in specified folder, in World Outliner.
    note: added in v1.0.4. The Result can be better displayed with the Utilities.Utils.EObjectFlags(IntFlag)

    Args:
        object (Object): The object you want to get the EObjectFlags.

    Returns:
        int32: The flag values in int32

call_function

Calling a function by name on given object.

unreal.PythonBPLib.call_function(object, functio_name_and_args) -> bool
    Calling a function by name on given object.

    Args:
        object (Object): The object you want to call the function.
        functio_name_and_args (str): The function name and the args.

    Returns:
        bool: Whether the function was called.

get_all_objects

Get all UObject in the 'world'.

unreal.PythonBPLib.get_all_objects(world, include_dead) -> Array(Object)
    Get all UObject in the 'world'.

    Args:
        world (World): The world owned the UObjects.
        include_dead (bool): Whether include the 'dead' (PendingKill | Unreachable) UObject or not.

    Returns:
        Array(Object):

        out_objects (Array(Object)): The All UObject in the world.

get_objects_by_class

Get all specified class's UObjects in the 'world'.

unreal.PythonBPLib.get_objects_by_class(world, object_class) -> Array(Object)
    Get all specified class's UObjects in the 'world'.

    Args:
        world (World): The world owned the actors.
        object_class (type(Class)): The specified of classes for query.

    Returns:
        Array(Object):

        out_objects (Array(Object)): The UObjects of specified class in the world.

get_all_worlds

Get all 'worlds' in editor。

unreal.PythonBPLib.get_all_worlds() -> Array(World)
    Get all 'worlds' in editor。

    Returns:
        Array(World):

        out_worlds (Array(World)): The worlds in the editor.

get_bp_class_hierarchy_package

Get the classes hierarchy of the blueprint instance class.

unreal.PythonBPLib.get_bp_class_hierarchy_package(class_) -> Array(Package) or None
    Get the classes hierarchy of the blueprint instance class.

    Args:
        class_ (type(Class)): The blueprint instance class you want to query.

    Returns:
        Array(Package) or None: Whether Retrieve the BP hierarchy succeeded.

        out_bpg_classes_package (Array(Package)): Array of classes hierarchy. 0th = this

get_redirectors_destination_object

Get the destination object of the Redirector.

unreal.PythonBPLib.get_redirectors_destination_object(redirector_obj) -> Object
    Get the destination object of the Redirector.

    Args:
        redirector_obj (ObjectRedirector): the Redirector Object.

    Returns:
        Object: a pointer to the Redirector's destination object.

fix_up_redirectors_in_folder

Fixup all redirector In specified folder

unreal.PythonBPLib.fix_up_redirectors_in_folder(folder_path, allowed_to_prompt_to_load_assets=True) -> bool
    Fixup all redirector In specified folder

    Args:
        folder_path (Array(str)): The folder path for fixup redirectors.
        allowed_to_prompt_to_load_assets (bool):

    Returns:
        bool: Whether fixup task succeeded.

fix_up_redirectors

Fix up specified redirectors.

unreal.PythonBPLib.fix_up_redirectors(redirector_objs) -> bool
    Fix up specified redirectors.

    Args:
        redirector_objs (Array(ObjectRedirector)): The redirector objects to be fixed.

    Returns:
        bool: Whether fix up task succeeded

get_selected_assets_paths

Get the selected assets paths in content browser

unreal.PythonBPLib.get_selected_assets_paths() -> Array(str)
    Get the selected assets paths in content browser

    Returns:
        Array(str): The paths of selected assets.

set_selected_assets_by_paths

Select specified assets in content browser.

unreal.PythonBPLib.set_selected_assets_by_paths(paths) -> None
    Select specified assets in content browser.

    Args:
        paths (Array(str)): The assets paths that will be selected, if empty, deselected current selection.

get_selected_folder

Get the selected folder's paths in content browser.

unreal.PythonBPLib.get_selected_folder() -> Array(str)
    Get the selected folder's paths in content browser.

    Returns:
        Array(str): The paths of current selected folders.

set_selected_folder

Select specified folder in content browser.

unreal.PythonBPLib.set_selected_folder(folders) -> None
    Select specified folder in content browser.

    Args:
        folders (Array(str)):

set_folder_color

Set the of specified folder's color in content browser.

unreal.PythonBPLib.set_folder_color(folder_path, color) -> None
    Set the of specified folder's color in content browser.

    Args:
        folder_path (str):
        color (LinearColor): The color of folder.

sync_to_assets

Sync Assets in Content Browser.

unreal.PythonBPLib.sync_to_assets(asset_data_list, allow_locked_browsers=False, focus_content_browser=True) -> None
    Sync Assets in Content Browser.

    Args:
        asset_data_list (Array(AssetData)): Asset Data list
        allow_locked_browsers (bool): Allow Sync in Locked Browsers
        focus_content_browser (bool): Set focus to the content browser

get_selected_components

Get selected components in World Outliner.

unreal.PythonBPLib.get_selected_components() -> Array(ActorComponent)
    Get selected components in World Outliner.

    Returns:
        Array(ActorComponent): The selected actor components.

create_folder_in_outliner

Create new folder in World Outliner.

unreal.PythonBPLib.create_folder_in_outliner(world, new_folder_name) -> None
    Create new folder in World Outliner.

    Args:
        world (World): World Context.
        new_folder_name (Name): The name of new folder.

set_selected_folder_path

Sets the folder path for all the selected actors.

unreal.PythonBPLib.set_selected_folder_path(path) -> None
    Sets the folder path for all the selected actors.

    Args:
        path (Name): The folder path name in World Outliner.

delete_folder

Delete specified folder in World Outliner.

unreal.PythonBPLib.delete_folder(world, folder_to_delete) -> None
    Delete specified folder in World Outliner.

    Args:
        world (World):
        folder_to_delete (Name): The name of folder path which need to be deleted.

get_actors_from_folder

Get actors that in specified folder, in World Outliner.

unreal.PythonBPLib.get_actors_from_folder(world, path) -> Array(Actor)
    Get actors that in specified folder, in World Outliner.
    note: added in v1.0.4

    Args:
        world (World): World Context
        path (str): The folder path name in World Outliner.

    Returns:
        Array(Actor):

        out_actors (Array(Actor)):

rename_folder_in_world

Rename the specified path to a new name.

unreal.PythonBPLib.rename_folder_in_world(world, old_path, new_path) -> bool
    Rename the specified path to a new name.

    Args:
        world (World): World Context
        old_path (Name): Old Folder Path
        new_path (Name): New Folder Path

    Returns:
        bool:

close_editor_for_assets

Close all active editors for the supplied asset.

unreal.PythonBPLib.close_editor_for_assets(assets) -> None
    Close all active editors for the supplied asset.

    Args:
        assets (Array(Object)): Array of assets that will be closed.

get_all_deps

Get all dependencies of specified package path.

unreal.PythonBPLib.get_all_deps(package_path, recursive, dependency_type=3) -> (out_dps_wf=Array(str), parent_indexs=Array(int32))
    Get all dependencies of specified package path.

    Args:
        package_path (Name): the name of the package for which to gather dependencies.
        recursive (bool): recursive or not.
        dependency_type (int32): Which kinds of dependency to include in the output list. For example: 3: package (Soft|Hard), 18: manage(SoftManager|HardManage), 25: all

    Returns:
        tuple:

        out_dps_wf (Array(str)): a list of packages that are referenced by the package whose path is PackageName, wide first.

        parent_indexs (Array(int32)):

get_all_refs

Get all referencers of specified package path

unreal.PythonBPLib.get_all_refs(package_path, recursive, dependency_type=3) -> (out_refs_wf=Array(str), parent_index=Array(int32))
    Get all referencers of specified package path

    Args:
        package_path (Name): the name of the package for which to gather references.
        recursive (bool): recursive or not
        dependency_type (int32): which kinds of dependency to include in the output list. For example: 3: package (Soft|Hard), 18: manage(SoftManager|HardManage) ,25: all

    Returns:
        tuple:

        out_refs_wf (Array(str)): a list of packages that reference the package whose path is PackageName, wide first

        parent_index (Array(int32)): a list of index of OutRefsWF element's parent

get_assets_data_by_package_names

Gets asset data for the assets in the packages

unreal.PythonBPLib.get_assets_data_by_package_names(package_names) -> Array(AssetData)
    Gets asset data for the assets in the packages
    note: This is 'batch' version of  unreal.AssetRegistry.get_assets_by_package_name(...)

    Args:
        package_names (Array(str)): the package names for the requested assets (eg, /Game/MyFolder/MyAsset)

    Returns:
        Array(AssetData):

        out_asset_datas (Array(AssetData)):

get_assets_data_by_class

Get AssetDatas for the assets in specified folders and types.

unreal.PythonBPLib.get_assets_data_by_class(paths_folders, class_names) -> Array(AssetData)
    Get AssetDatas for the assets in specified folders and types.

    Args:
        paths_folders (Array(str)): Array of target folders.
        class_names (Array(Name)): Specified class types. For example, ["World", "MaterialInstance", "StaticMesh", and so on..]

    Returns:
        Array(AssetData):

        out_asset_datas (Array(AssetData)): Result of AssetDatas.

list_assets_by_class

Get asset paths(assetData.ObjectPath)for the specified folders and types.

unreal.PythonBPLib.list_assets_by_class(paths_folders, class_names) -> Array(Name)
    Get asset paths(assetData.ObjectPath)for the specified folders and types.

    Args:
        paths_folders (Array(str)): Array of target folders.
        class_names (Array(Name)): Specified class types.

    Returns:
        Array(Name):

        out_object_path (Array(Name)): Result of asset paths.

select_none

De-select all actors. Does nothing if GEdSelectionLock is true.

unreal.PythonBPLib.select_none(note_selection_change=True, deselect_bsp_surfs=True) -> None
    De-select all actors.  Does nothing if GEdSelectionLock is true.

    Args:
        note_selection_change (bool): If true, call NoteSelectionChange().
        deselect_bsp_surfs (bool): If true, also deselected all BSP surfaces.

select_named_actor

Select actor by name(ID Name)

unreal.PythonBPLib.select_named_actor(name, clear_selected=True) -> Actor
    Select actor by name(ID Name)

    Args:
        name (str): The ID Name of actor, not the label name.
        clear_selected (bool): If true, deselected before select new actor.

    Returns:
        Actor: A pointer to the named actor or NULL if not found.

select_component

Select specified component of current actor

unreal.PythonBPLib.select_component(component, selected, notify=True) -> None
    Select specified component of current actor

    Args:
        component (ActorComponent): The Component to be selected.
        selected (bool): Select or deSelect.
        notify (bool): Notify or not.

select_actor

Select specified actor.

unreal.PythonBPLib.select_actor(actor, selected, notify, select_even_if_hidden=False, force_refresh=False) -> None
    Select specified actor.

    Args:
        actor (Actor): The Actor to be selected.
        selected (bool): Select or deSelect.
        notify (bool): Notify or not.
        select_even_if_hidden (bool): If True, actor will be selected even it's hidden
        force_refresh (bool): Force Refresh or not

find_actor_by_name

Get actor by name(ID Name) in specified World

unreal.PythonBPLib.find_actor_by_name(name, world=None, include_dead=True) -> Actor
    Get actor by name(ID Name) in specified World

    Args:
        name (str): Name(ID Name) of actor
        world (World): World Context
        include_dead (bool):

    Returns:
        Actor: A pointer to the named actor or NULL if not found.

find_actors_by_label_name

Get actor by Label name(display Name) in specified World

unreal.PythonBPLib.find_actors_by_label_name(name, world=None, include_dead=True) -> Array(Actor)
    Get actor by Label name(display Name) in specified World
    note: added in v1.0.3

    Args:
        name (str): Name(Label Name) of actor
        world (World): World Context
        include_dead (bool):

    Returns:
        Array(Actor): A pointer to the named actor or NULL if not found.

execute_console_command

Execute Console Command

unreal.PythonBPLib.execute_console_command(console_command) -> None
    Execute Console Command

    Args:
        console_command (str): The console command

exec_python_command

Execute Python Command if Python is available

unreal.PythonBPLib.exec_python_command(python_command) -> None
    Execute Python Command if Python is available

    Args:
        python_command (str): The python command

set_anim_blueprint

Assign the animBlueprint to the SkeletalMeshComponent, this will clear and re-initializes the anim instance with the new class and sets animation mode to 'AnimationBlueprint'

unreal.PythonBPLib.set_anim_blueprint(mesh_component, anim_blueprint) -> None
    Assign the animBlueprint to the SkeletalMeshComponent, this will clear and re-initializes the anim instance with the new class and sets animation mode to 'AnimationBlueprint'

    Args:
        mesh_component (SkeletalMeshComponent): Skeletal mesh component
        anim_blueprint (AnimBlueprint): The new AnimBlueprint

get_anim_blueprint_generated_class

Get the generated class of the animBlueprint

unreal.PythonBPLib.get_anim_blueprint_generated_class(anim_blueprint) -> type(Class)
    Get the generated class of the animBlueprint

    Args:
        anim_blueprint (AnimBlueprint): Skeletal mesh component return a Pointer to the 'most recent' fully generated class

    Returns:
        type(Class):

get_blueprint_generated_class

Get the generated class of the Blueprint

unreal.PythonBPLib.get_blueprint_generated_class(blueprint) -> Object
    Get the generated class of the Blueprint

    Args:
        blueprint (Blueprint): The blueprint instance you want to query. return a Pointer to the 'most recent' fully generated class

    Returns:
        Object:

get_static_mesh_section_info

Get the material indexes of specified LOD in static mesh

unreal.PythonBPLib.get_static_mesh_section_info(mesh, lod_level) -> Array(int32)
    Get the material indexes of specified LOD in static mesh

    Args:
        mesh (StaticMesh): The mesh component
        lod_level (int32): Specified LOD

    Returns:
        Array(int32):

        out_material_indexs (Array(int32)): Result Material Indexes array

set_static_mesh_lod_material_id

Assign the specified section material in Mesh

unreal.PythonBPLib.set_static_mesh_lod_material_id(mesh, lod_level, section_index, id_in_mesh_static_material, modify_immediately=True) -> None
    Assign the specified section material in Mesh

    Args:
        mesh (StaticMesh): The mesh component.
        lod_level (int32): Specified LOD.
        section_index (int32): The Section ID in mesh.
        id_in_mesh_static_material (int32): The Material Index in mesh's material slots.
        modify_immediately (bool): Modify Immediately or not.

message_dialog

Open a modal message box dialog

unreal.PythonBPLib.message_dialog(message, dialog_title) -> None
    Open a modal message box dialog
    para: DialogTitle             Text of title in dialog

    Args:
        message (str): Text of message to show
        dialog_title (str):

confirm_dialog

Open a modal message box dialog with Yes/No/Cancel button.

unreal.PythonBPLib.confirm_dialog(message, dialog_title, with_cancel_button=False) -> bool
    Open a modal message box dialog with Yes/No/Cancel button.

    Args:
        message (str): Text of message to show.
        dialog_title (str): Text of title in dialog.
        with_cancel_button (bool): Show cancel button or not.

    Returns:
        bool:

open_file_dialog

Open a files picker dialog.

unreal.PythonBPLib.open_file_dialog(dialog_title, default_path, default_file, file_types) -> Array(str)
    Open a files picker dialog.
    DefaultFile: Default file name of dialog
    FileTypes: File types filter
    OutFilenames: The picked files paths

    Args:
        dialog_title (str): Text of dialog title
        default_path (str): Default path of dialog
        default_file (str):
        file_types (str):

    Returns:
        Array(str):

        out_filenames (Array(str)):

save_file_dialog

Open a save file dialog.

unreal.PythonBPLib.save_file_dialog(dialog_title, default_path, default_file, file_types) -> Array(str)
    Open a save file dialog.
    DefaultFile: Default file name of dialog
    FileTypes: File types filter
    OutFilenames: The picked files path

    Args:
        dialog_title (str): Text of dialog title
        default_path (str): Default path of dialog
        default_file (str):
        file_types (str):

    Returns:
        Array(str):

        out_filenames (Array(str)):

open_directory_dialog

Open a directory picker dialog.

unreal.PythonBPLib.open_directory_dialog(dialog_title, default_path) -> str or None
    Open a directory picker dialog.
    OutFolderName: The picked folder path

    Args:
        dialog_title (str): Text of dialog title
        default_path (str): Default path of dialog

    Returns:
        str or None:

        out_folder_name (str):

get_plugin_base_dir

Get the base directory of named plug-in.

unreal.PythonBPLib.get_plugin_base_dir(plugin_name) -> str
    Get the base directory of named plug-in.

    Args:
        plugin_name (str): Name of the plug-in

    Returns:
        str:

set_clipboard_content

Set the string content to clipboard

unreal.PythonBPLib.set_clipboard_content(str) -> None
    Set the string content to clipboard

    Args:
        str (str): Text to paste

get_clipboard_content

Get the string content From clipboard

unreal.PythonBPLib.get_clipboard_content() -> str
    Get the string content From clipboard

    Returns:
        str:

        dest (str):

notification

Adds a floating notification

unreal.PythonBPLib.notification(message, info_level=0, expire_duration=5.000000, width_override=-1.000000, log_to_console=True, hyperlink_text="", on_hyperlink_click_command="") -> None
    log: 0, warning: 1, Error 2 ||-1

    Args:
        message (str):
        info_level (int32):
        expire_duration (float):
        width_override (float):
        log_to_console (bool):
        hyperlink_text (str):
        on_hyperlink_click_command (str):

get_all_chameleon_data_paths

Get the chameleonData by JSON file path

unreal.PythonBPLib.get_all_chameleon_data_paths() -> Array(str)
    Get the chameleonData by JSON file path

    Returns:
        Array(str): All path of current Chameleon Tools's JSON file paths.

get_chameleon_data

Get the chameleonData by JSON file path

unreal.PythonBPLib.get_chameleon_data(tools_json_path) -> ChameleonData
    Get the chameleonData by JSON file path

    Args:
        tools_json_path (str): Path of the JSON file path, which was binded when create the widget

    Returns:
        ChameleonData:

multi_line_trace_at_once_by_profile

Trace Multi rays against the world using a specific profile in a gird and return the first blocking hits,

unreal.PythonBPLib.multi_line_trace_at_once_by_profile(context_obj, start_locs, end_locs, profile_name, draw_debug_type, draw_time) -> (out_is_hit=Array(bool), out_hit_locs=Array(Vector))
    Trace Multi rays against the world using a specific profile in a gird and return the first blocking hits,

    Args:
        context_obj (Object): World Content Object
        start_locs (Array(Vector)): Center of the ray trace gird
        end_locs (Array(Vector)): Width of the grid
        profile_name (Name): The 'profile' used to determine which components to hit
        draw_debug_type (DrawDebugTrace): Whether draw debug line or not
        draw_time (float): Debug line display duration

    Returns:
        tuple:

        out_is_hit (Array(bool)):

        out_hit_locs (Array(Vector)): The locations of hit result.

sample_heights

Trace rays against the world using a specific profile in a gird and return the first blocking hits,

unreal.PythonBPLib.sample_heights(context_obj, center, width, height, grid_size, trace_depth, profile_name, draw_debug_type, draw_time, default_height) -> (out_x_count=int32, out_y_count=int32, out_hit_locs=Array(Vector))
    Trace rays against the world using a specific profile in a gird and return the first blocking hits,

    Args:
        context_obj (Object): World Content Object
        center (Vector): Center of the ray trace gird
        width (float): Width of the grid
        height (float): The height of ray trace start point
        grid_size (float): The ray trace interval size
        trace_depth (float): Distance from trace start point to the end point
        profile_name (Name): The 'profile' used to determine which components to hit
        draw_debug_type (DrawDebugTrace): Whether draw debug line or not
        draw_time (float): Debug line display duration
        default_height (float): The 'default height' when trace has no result

    Returns:
        tuple:

        out_x_count (int32): The count of trace point in axis-x

        out_y_count (int32): The count of trace point in axis-y

        out_hit_locs (Array(Vector)): The locations of hit result.

gc

Deletes all unreferenced objects, keeping objects that have any of the passed in KeepFlags set. Will wait for other threads to unlock GC.

unreal.PythonBPLib.gc(keep_flags, perform_full_purge=True) -> None
    Deletes all unreferenced objects, keeping objects that have any of the passed in KeepFlags set. Will wait for other threads to unlock GC.

    Args:
        keep_flags (int32): objects with those flags will be kept regardless of being referenced or not
        perform_full_purge (bool): if true, perform a full purge after the mark pass

pilot_level_actor

Moves the viewport camera according to the actors location and rotation

unreal.PythonBPLib.pilot_level_actor(actor_to_pilot) -> None
    Moves the viewport camera according to the actors location and rotation

    Args:
        actor_to_pilot (Actor): The actor to pilot

eject_pilot_level_actor

Eject the viewport camera

unreal.PythonBPLib.eject_pilot_level_actor() -> None
    Eject the viewport camera

get_pilot_level_actor

Get the Pilot actor of current Active viewport

unreal.PythonBPLib.get_pilot_level_actor() -> Actor
    Get the Pilot actor of current Active viewport

    Returns:
        Actor: The pilot actor

get_level_viewport_camera_info

Get the location and rotation of level viewport camera

unreal.PythonBPLib.get_level_viewport_camera_info() -> (camera_location=Vector, camera_rotation=Rotator) or None
    Get the location and rotation of level viewport camera

    Returns:
        tuple or None:

        camera_location (Vector): Location of level viewport camera

        camera_rotation (Rotator): Rotation of level viewport camera

get_level_viewport_camera_fov

unreal.PythonBPLib.get_level_viewport_camera_fov() -> float
    Get Level Viewport Camera Fov

    Returns:
        float:

set_level_viewport_camera_info

Set the location and rotation of level viewport camera

unreal.PythonBPLib.set_level_viewport_camera_info(camera_location, camera_rotation) -> None
    Set the location and rotation of level viewport camera

    Args:
        camera_location (Vector): Location of level viewport camera
        camera_rotation (Rotator): Rotation of level viewport camera

set_level_viewport_real_time

Set the viewport real-time state.

unreal.PythonBPLib.set_level_viewport_real_time(realtime) -> None
    Set the viewport real-time state.

    Args:
        realtime (bool): Whether real-time or not

request_viewport_focus_on_selection

Move the editor camera in front of selection.

unreal.PythonBPLib.request_viewport_focus_on_selection(context_obj=None) -> None
    Move the editor camera in front of selection.

    Args:
        context_obj (Object): Context Object for get the world.

set_level_viewport_is_in_game_view

Set IsInGameView of level view.

unreal.PythonBPLib.set_level_viewport_is_in_game_view(game_view) -> None
    Set IsInGameView of level view.

    Args:
        game_view (bool): Is game view.

set_level_viewport_locked

Set Whether showing the exact camera view when locking a viewport to a camera.

unreal.PythonBPLib.set_level_viewport_locked(locked) -> None
    Set Whether showing the exact camera view when locking a viewport to a camera.

    Args:
        locked (bool): Game view locked state.

get_resource_size

Get the size of the object/resource for use in memory tools

unreal.PythonBPLib.get_resource_size(object, exclusive) -> int32
    Get the size of the object/resource for use in memory tools
    This is the simple version which just returns the total number of bytes used by this object.
    note: Exclusive: Only include memory used by non-UObject resources that are directly owned by this UObject. This is used to show memory actually used at runtime, otherwise include exclusive resources and UObject serialized memory for this and all child UObjects, but not memory for external referenced assets or editor only members. This is used in the editor to estimate maximum required memory. Detail sea EResourceSizeMode

    Args:
        object (Object): The object you want to query.
        exclusive (bool): Exclusive or not

    Returns:
        int32: The cumulative size of this object in memory

spawn_actor_from_object

Create an actor and place it in the world editor. The Actor can be created from a Factory, Archetype, Blueprint, Class or an Asset.

unreal.PythonBPLib.spawn_actor_from_object(obj_to_use, location, rotation=[0.000000, 0.000000, 0.000000], transient=False, select_actors=False) -> Actor
    Create an actor and place it in the world editor. The Actor can be created from a Factory, Archetype, Blueprint, Class or an Asset.
    The actor will be created in the current level and will be selected.
    note: This is alternative version of EditorLevelLibaray.SpawnActorFromObject, and fixed the memory leak issus in before UE 4.27

    Args:
        obj_to_use (Object):
        location (Vector): Location of the new actor.
        rotation (Rotator):
        transient (bool):
        select_actors (bool):

    Returns:
        Actor: The created actor.

spawn_actor_from_class

Create an actor and place it in the world editor. Can be created from a Blueprint or a Class.

unreal.PythonBPLib.spawn_actor_from_class(actor_class, location, rotation=[0.000000, 0.000000, 0.000000], transient=False, select_actors=False) -> Actor
    Create an actor and place it in the world editor. Can be created from a Blueprint or a Class.
    The actor will be created in the current level and will be selected.
    note: This is alternative version of EditorLevelLibaray.SpawnActorFromClass, and fixed the memory leak issus in before UE 4.27

    Args:
        actor_class (type(Class)): Asset to attempt to use for an actor to place.
        location (Vector): Location of the new actor.
        rotation (Rotator):
        transient (bool):
        select_actors (bool):

    Returns:
        Actor: The created actor.

add_component

Create a specified Component for actor.

unreal.PythonBPLib.add_component(component_class, actor, parent_component, name="None") -> ActorComponent
    Create a specified Component for actor.

    Args:
        component_class (type(Class)): The Component type.
        actor (Actor): The actor owner the created component.
        parent_component (SceneComponent): The parent component for created component.The root component will be used when null.
        name (Name): The Name for the created Component

    Returns:
        ActorComponent: The created component.

delete_asset

Delete the asset in path.

unreal.PythonBPLib.delete_asset(asset_path_to_delete, show_confirmation=True) -> bool
    Delete the asset in path.
    note: This can't undo.

    Args:
        asset_path_to_delete (str): The Component type.
        show_confirmation (bool): Show confirmation dialog or not.

    Returns:
        bool:

enable_world_composition

Enable World Composition in current level.

unreal.PythonBPLib.enable_world_composition(world, enable) -> bool
    Enable World Composition in current level.

    Args:
        world (World): The World context.
        enable (bool): Enable the World Composition option or not.

    Returns:
        bool:

export_map

Exports the specified actor mesh to .obj file.

unreal.PythonBPLib.export_map(actor, filename, export_selected_actors_only) -> None
    Exports the specified actor mesh to .obj file.
    note: Useful when export landscape to mesh obj.

    Args:
        actor (Actor): The actor to be export.
        filename (str): Filename to export to.
        export_selected_actors_only (bool): If true, export only the selected actors.

diff_assets

Compare assets by 3rd compare tools, for instance: p4merge etc..

unreal.PythonBPLib.diff_assets(asset_a, asset_b) -> None
    Compare assets by 3rd compare tools, for instance: p4merge etc..

    Args:
        asset_a (Object):
        asset_b (Object):

open_pick_path_dialog

Open A 'UE style' Pick Path Dialog

unreal.PythonBPLib.open_pick_path_dialog(dialog_title="Pick Path", default_path="/Game") -> str
    Open A 'UE style' Pick Path Dialog
    note: The DefaultPaht should starts with '/Game', and ends with '/' if pick a folder in 'Content'; 'Engine Content/some_folder' for folder in 'Engine Content'

    Args:
        dialog_title (str): The Title for Dialog
        default_path (str): Default Folder, should ends with '/'.

    Returns:
        str:

open_new_asset_path_dialog

Open A 'UE style' Pick Asset Path Dialog

unreal.PythonBPLib.open_new_asset_path_dialog(dialog_title="Pick Asset Path", default_path="", allow_read_only_folders=True) -> str
    Open A 'UE style' Pick Asset Path Dialog
    note: The DefaultPaht should starts with '/Game'

    Args:
        dialog_title (str): The Title for Dialog
        default_path (str): Default path and name for new asset path.
        allow_read_only_folders (bool):

    Returns:
        str:

save_thumbnail

Save the Thumbnail of assets to disc.

unreal.PythonBPLib.save_thumbnail(object_path, output_path) -> None
    Save the Thumbnail of assets to disc.

    Args:
        object_path (str): The specified path of asset
        output_path (str): Thumbnail output path

apply_instance_changes_to_blueprint

Apply Instance Changes To Blueprint

unreal.PythonBPLib.apply_instance_changes_to_blueprint(actor) -> int32
    Apply Instance Changes To Blueprint

    Args:
        actor (Actor): The target actor

    Returns:
        int32: Changed Properties count

get_viewport_pixels

Get the raw pixels from first active viewport

unreal.PythonBPLib.get_viewport_pixels() -> (Array(Color), out_size_xy=IntPoint)
    Get the raw pixels from first active viewport
    note: added in v1.0.4

    Returns:
        IntPoint:

        out_size_xy (IntPoint):

viewport_redraw

Redraw the first active viewport

unreal.PythonBPLib.viewport_redraw() -> None
    Redraw the first active viewport
    note: added in v1.0.4

update_reflection_capture_preview_shape

unreal.PythonBPLib.update_reflection_capture_preview_shape(capture_component) -> None
    Update Reflection Capture Preview Shape

    Args:
        capture_component (ReflectionCaptureComponent):

break_soft_object

Break the SoftObject content into Array: [AssetPathString, SubPathString]

unreal.PythonBPLib.break_soft_object(soft_object_path) -> Array(str)
    Break the SoftObject content into Array:  [AssetPathString, SubPathString]
    note: added in v1.0.4

    Args:
        soft_object_path (SoftObjectPath):

    Returns:
        Array(str): AssetPathString and SubPathString of the SoftObect in a array.

get_unreal_version

Get the Version of Unreal Engine in a map(dict). The keys: ["Major", "Minor", "Patch"]

unreal.PythonBPLib.get_unreal_version() -> Map(str, int32)
    Get the Version of Unreal Engine in a map(dict). The keys: ["Major", "Minor", "Patch"]
    note: added in v1.0.4

    Returns:
        Map(str, int32): The versions of current engine.

guid_from_string

Generate a Guid instance from Guid value string. The new Guid's value will to the input guid string.

unreal.PythonBPLib.guid_from_string(guid_str) -> Guid
    Generate a Guid instance from Guid value string. The new Guid's value will to the input guid string.
    note: added in v1.0.4

    Args:
        guid_str (str): string of guid value, the length should equal 32.

    Returns:
        Guid: Guid

PythonDataTableLib

Function Name Description
get_data_table_struct_path Get the row struct's path of the given DataTable.
get_data_table_struct Get the row struct of the given DataTable.
get_table_as_json Get the datatable content as JSON
get_row_names Get the Row names of the given datatable.
get_column_names Get the Column names of the given datatable.
get_shape Get the Shape of the given datatable. The title and the row names are not included.
remove_row Remove the specified row of the given datatable
add_row Add a row in the given datatable
duplicate_row Duplicate a row in the given datatable
rename_row Rename the specified row in the given datatable
reset_row Reset the specified row in the given datatable to default values.
move_row Reset the specified row in the given datatable to default values.
get_row_name Gets the Row name of the specified row in datatable
get_column_name Gets the Column name of the specified column in datatable
get_flatten_data_table Get the content of datatable as a 1D string List.
get_property_as_string Get the specified cell's value as string in datatable
get_property_as_string_at Get the specified cell's value as string in datatable
set_property_by_string Set the specified cell's property in datatable
set_property_by_string_at Set the specified cell's property in datatable

get_data_table_struct_path

Get the row struct's path of the given DataTable.

unreal.PythonDataTableLib.get_data_table_struct_path(data_table) -> str
    Get the row struct's path of the given  DataTable.

    Args:
        data_table (DataTable): The DataTable for query.

    Returns:
        str: The package path of struct, empty string if failed.

get_data_table_struct

Get the row struct of the given DataTable.

unreal.PythonDataTableLib.get_data_table_struct(data_table) -> ScriptStruct
    Get the row struct of the given DataTable.

    Args:
        data_table (DataTable): The DataTable for query.

    Returns:
        ScriptStruct: The row struct of the datatable.

get_table_as_json

Get the datatable content as JSON

unreal.PythonDataTableLib.get_table_as_json(data_table) -> str
    Get the datatable content as JSON

    Args:
        data_table (DataTable): The DataTable you want to query.

    Returns:
        str: The datatable content as JSON

get_row_names

Get the Row names of the given datatable.

unreal.PythonDataTableLib.get_row_names(data_table) -> Array(Name)
    Get the Row names of the given datatable.

    Args:
        data_table (DataTable): The DataTable you want to query.

    Returns:
        Array(Name): The row names list.

get_column_names

Get the Column names of the given datatable.

unreal.PythonDataTableLib.get_column_names(data_table, friendly_name=True, include_name=False) -> Array(Name)
    Get the Column names of the given datatable.

    Args:
        data_table (DataTable): The DataTable you want to query.
        friendly_name (bool): Get the Friendly Name or Raw Name.
        include_name (bool): Include the Row Name Column or not.

    Returns:
        Array(Name): The Column names list.

get_shape

Get the Shape of the given datatable. The title and the row names are not included.

unreal.PythonDataTableLib.get_shape(data_table) -> Array(int32)
    Get the Shape of the given datatable. The title and the row names are not included.

    Args:
        data_table (DataTable): The DataTable you want to query.

    Returns:
        Array(int32): return the row number and column number of the datatable: [RowNumber, ColumnNumber]

remove_row

Remove the specified row of the given datatable

unreal.PythonDataTableLib.remove_row(data_table, row_name) -> bool
    Remove the specified row of the given datatable

    Args:
        data_table (DataTable): The DataTable you want to modify.
        row_name (Name): The Row Name

    Returns:
        bool: True if the row has been removed

add_row

Add a row in the given datatable

unreal.PythonDataTableLib.add_row(data_table, row_name) -> bool
    Add a row in the given datatable

    Args:
        data_table (DataTable): The DataTable you want to modify.
        row_name (Name): The Row Name of new line

    Returns:
        bool: True if the row has been added

duplicate_row

Duplicate a row in the given datatable

unreal.PythonDataTableLib.duplicate_row(data_table, source_row_name, row_name) -> bool
    Duplicate a row in the given datatable

    Args:
        data_table (DataTable): The DataTable you want to modify.
        source_row_name (Name): The Row Name of the source Row
        row_name (Name): The Row Name of new line

    Returns:
        bool: True if the row has been duplicated

rename_row

Rename the specified row in the given datatable

unreal.PythonDataTableLib.rename_row(data_table, old_name, new_name) -> bool
    Rename the specified row in the given datatable

    Args:
        data_table (DataTable): The DataTable you want to modify.
        old_name (Name): The old Row Name
        new_name (Name): The new Row Name

    Returns:
        bool: True if the row has been renamed

reset_row

Reset the specified row in the given datatable to default values.

unreal.PythonDataTableLib.reset_row(data_table, row_name) -> bool
    Reset the specified row in the given datatable to default values.

    Args:
        data_table (DataTable): The DataTable you want to modify.
        row_name (Name): The Row Name

    Returns:
        bool: True if the row has been reset

move_row

Reset the specified row in the given datatable to default values.

unreal.PythonDataTableLib.move_row(data_table, row_name, up, num_rows_to_move_by=1) -> bool
    Reset the specified row in the given datatable to default values.

    Args:
        data_table (DataTable): The DataTable you want to modify.
        row_name (Name): The Row Name of the 'source row'
        up (bool): Move up or not
        num_rows_to_move_by (int32): Number of rows to move by.

    Returns:
        bool: True if the row has been moved

get_row_name

Gets the Row name of the specified row in datatable

unreal.PythonDataTableLib.get_row_name(data_table, row_id) -> Name
    Gets the Row name of the specified row in datatable

    Args:
        data_table (DataTable): The DataTable you want to modify.
        row_id (int32): The index of the row

    Returns:
        Name: The Row name

get_column_name

Gets the Column name of the specified column in datatable

unreal.PythonDataTableLib.get_column_name(data_table, column_id, friendly_name=True) -> Name
    Gets the Column name of the specified column in datatable

    Args:
        data_table (DataTable): The DataTable you want to modify
        column_id (int32): The index of the column
        friendly_name (bool): Whether get the friendly name or raw name or not

    Returns:
        Name: The Row name

get_flatten_data_table

Get the content of datatable as a 1D string List.

unreal.PythonDataTableLib.get_flatten_data_table(data_table, include_header=False) -> Array(str)
    Get the content of datatable as a 1D string List.
    note: The length of return value will equal RowNumber * ColumnNumber, when bIncludeHeader set to false

    Args:
        data_table (DataTable): The DataTable you want to modify
        include_header (bool): Whether include the title and row name column.

    Returns:
        Array(str): The content in 1D string List

get_property_as_string

Get the specified cell's value as string in datatable

unreal.PythonDataTableLib.get_property_as_string(data_table, row_name, column_name) -> str
    Get the specified cell's value as string in datatable

    Args:
        data_table (DataTable): The DataTable you want to query.
        row_name (Name): The Row name of the cell.
        column_name (Name): The Column name of the cell.

    Returns:
        str: The property of the cell as string.

get_property_as_string_at

Get the specified cell's value as string in datatable

unreal.PythonDataTableLib.get_property_as_string_at(data_table, row_id, column_id) -> str
    Get the specified cell's value as string in datatable

    Args:
        data_table (DataTable): The DataTable you want to query.
        row_id (int32): The Row index of the cell. The title is not include
        column_id (int32): The Column index of the cell. The title is not include

    Returns:
        str: The property of the cell as string.

set_property_by_string

Set the specified cell's property in datatable

unreal.PythonDataTableLib.set_property_by_string(data_table, row_name, column_name, value_as_string) -> bool
    Set the specified cell's property in datatable

    Args:
        data_table (DataTable): The DataTable you want to query.
        row_name (Name): The Row name of the cell.
        column_name (Name): The Column name of the cell.
        value_as_string (str): The new property in string format.

    Returns:
        bool: True if the new property has been set

set_property_by_string_at

Set the specified cell's property in datatable

unreal.PythonDataTableLib.set_property_by_string_at(data_table, row_index, column_index, value_as_string) -> bool
    Set the specified cell's property in datatable

    Args:
        data_table (DataTable): The DataTable you want to query.
        row_index (int32): The Row index of the cell. The title is not include
        column_index (int32): The Column index of the cell. The title is not include
        value_as_string (str): The new property in string format.

    Returns:
        bool: True if the new property has been set

PythonEnumLib

Function Name Description
get_display_name_map Get the DiaplayNameMap of the given User Define Enum. Key: Raw Enum Num, Value:Display Name
set_enum_items Set the items of the given User Define Enum.
get_enum_len Get the number of the given User Define Enum's items.
get_display_name_by_index Get the display name of the given User Define Enum
set_display_name Get the display name of the given User Define Enum
get_description_by_index Get the Description of the given User Define Enum Item
set_description_by_index Set the Description of the given User Define Enum Item
get_name_by_index Get the raw name of the given User Define Enum
move_enum_item Moves the enumerator at the given initial index to a new target index, shifting other enumerators as needed.
is_bitflags_type Check if the enumerator-as-bitflags meta data is set
set_bitflags_type Set the state of the bitflags of the given User Define Enum
get_cpp_form Get the CppForm value as int of the given User Define Enum

get_display_name_map

Get the DiaplayNameMap of the given User Define Enum. Key: Raw Enum Num, Value:Display Name

unreal.PythonEnumLib.get_display_name_map(enum) -> Map(Name, Text)
    Get the DiaplayNameMap of the given User Define Enum. Key: Raw Enum Num, Value:Display Name
    note: Return value is a map, unordered.

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.

    Returns:
        Map(Name, Text): The DisplayNameMap in enum. (type: <class 'Map'>)

set_enum_items

Set the items of the given User Define Enum.

unreal.PythonEnumLib.set_enum_items(enum, display_names) -> None
    Set the items of the given User Define Enum.

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to modify.
        display_names (Array(str)): The display names of the enum's items. The Raw Enum Name will generated automaticly.

get_enum_len

Get the number of the given User Define Enum's items.

unreal.PythonEnumLib.get_enum_len(enum) -> int32
    Get the number of the given User Define Enum's items.

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.

    Returns:
        int32: Number of User Define Enum

get_display_name_by_index

Get the display name of the given User Define Enum

unreal.PythonEnumLib.get_display_name_by_index(enum, index) -> str
    Get the display name of the given User Define Enum

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.
        index (int32): The index of the enum item, 0-based.

    Returns:
        str: The display name of the enum item

set_display_name

Get the display name of the given User Define Enum

unreal.PythonEnumLib.set_display_name(enum, index, new_display_name) -> bool
    Get the display name of the given User Define Enum

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.
        index (int32): The index of the enum item, 0-based.
        new_display_name (str): The new display name

    Returns:
        bool: True if the new name set.

get_description_by_index

Get the Description of the given User Define Enum Item

unreal.PythonEnumLib.get_description_by_index(enum, index) -> str
    Get the Description of the given User Define Enum Item

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.
        index (int32): The index of the enum item, 0-based.

    Returns:
        str: The description name of the enum item

set_description_by_index

Set the Description of the given User Define Enum Item

unreal.PythonEnumLib.set_description_by_index(enum, index, description) -> bool
    Set the Description of the given User Define Enum Item

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.
        index (int32): The index of the enum item, 0-based.
        description (str): The description of the enum item.

    Returns:
        bool: True if the description set.

get_name_by_index

Get the raw name of the given User Define Enum

unreal.PythonEnumLib.get_name_by_index(enum, index) -> str
    Get the raw name of the given User Define Enum

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.
        index (int32): The index of the enum item, 0-based.

    Returns:
        str: The raw name of the enum item

move_enum_item

Moves the enumerator at the given initial index to a new target index, shifting other enumerators as needed.

unreal.PythonEnumLib.move_enum_item(enum, initial_index, target_index) -> None
    Moves the enumerator at the given initial index to a new target index, shifting other enumerators as needed.
    E.g. with enum [A, B, C, D, E], moving index 1 to index 3 results in [A, C, D, B, E].

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to modify.
        initial_index (int32): The initial index of the enum item
        target_index (int32): The target index of the enum item

is_bitflags_type

Check if the enumerator-as-bitflags meta data is set

unreal.PythonEnumLib.is_bitflags_type(enum) -> bool
    Check if the enumerator-as-bitflags meta data is set

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.

    Returns:
        bool: Whether has Bitflags or not.

set_bitflags_type

Set the state of the bitflags of the given User Define Enum

unreal.PythonEnumLib.set_bitflags_type(enum, bitflags_type) -> None
    Set the state of the bitflags of the given User Define Enum

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.
        bitflags_type (bool): Bitflags Value

get_cpp_form

Get the CppForm value as int of the given User Define Enum

unreal.PythonEnumLib.get_cpp_form(enum) -> int32
    Get the CppForm value as int of the given User Define Enum

    Args:
        enum (UserDefinedEnum): The User Define Enum you want to query.

    Returns:
        int32: ECppForm value as int.          0: Regular, 1: Namespaced, 2EnumClass

PythonLandscapeLib

Function Name Description
create_landscape Create A Landscape in Editor.
create_landscape_proxy Create A StreamingProxy in Editor.
create_landscape_proxy_with_guid Create A StreamingProxy in Editor.
add_adjacent_landscape_proxy Add A Neighbor StreamingProxy in specified direction
get_landscape_guid Get the guid from landscape
get_landscape_components Get the Components from landscape
set_heightmap_data Set height data for specified Landscape
get_heightmap_data Get height data for specified Landscape
cal_landscape_size Calculate the Size of Landscape (the size of heightmap data).
landscape_get_grass_components Get the HISM component for drawing GrassType.
landscape_flush_grass_components Flush the grass cache of landscape.

create_landscape

Create A Landscape in Editor.

unreal.PythonLandscapeLib.create_landscape(landscape_transform, section_size, sections_per_component, component_count_x, component_count_y) -> Landscape
    Create A Landscape in Editor.

    Args:
        landscape_transform (Transform): The transform of landscape.
        section_size (int32): The Section Size of the landscape. (63, 127, 255 and so on.)
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): Number of components in Axis X
        component_count_y (int32): Number of components in Axis Y

    Returns:
        Landscape: The created Landscape.

create_landscape_proxy

Create A StreamingProxy in Editor.

unreal.PythonLandscapeLib.create_landscape_proxy(landscape_transform, section_size, sections_per_component, component_count_x, component_count_y, shared_landscape_actor) -> LandscapeStreamingProxy
    Create A StreamingProxy in Editor.
    note: Haven't test in UE5 yet.

    Args:
        landscape_transform (Transform): The transform of landscape.
        section_size (int32): The Section Size of the landscape. (63, 127, 255 and so on.)
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): Number of components in Axis X
        component_count_y (int32): Number of components in Axis Y
        shared_landscape_actor (Landscape): The shared landscape witch share the GUID with the proxy

    Returns:
        LandscapeStreamingProxy: The created LandscapeStreamingProxy.

create_landscape_proxy_with_guid

Create A StreamingProxy in Editor.

unreal.PythonLandscapeLib.create_landscape_proxy_with_guid(landscape_transform, section_size, sections_per_component, component_count_x, component_count_y, guid) -> LandscapeStreamingProxy
    Create A StreamingProxy in Editor.
    note: Haven't test in UE5 yet.

    Args:
        landscape_transform (Transform): The transform of landscape.
        section_size (int32): The Section Size of the landscape. (63, 127, 255 and so on.)
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): Number of components in Axis X
        component_count_y (int32): Number of components in Axis Y
        guid (Guid): The GUID with the proxy

    Returns:
        LandscapeStreamingProxy: The created LandscapeStreamingProxy.

add_adjacent_landscape_proxy

Add A Neighbor StreamingProxy in specified direction

unreal.PythonLandscapeLib.add_adjacent_landscape_proxy(world_in, source_landscape, direction) -> LandscapeStreamingProxy
    East:0 South:1 West:2 North:3

    Args:
        world_in (World):
        source_landscape (LandscapeProxy):
        direction (int32):

    Returns:
        LandscapeStreamingProxy:

get_landscape_guid

Get the guid from landscape

unreal.PythonLandscapeLib.get_landscape_guid(landscape_proxy) -> Guid
    Get the guid from landscape

    Args:
        landscape_proxy (LandscapeProxy): The landscape instance.

    Returns:
        Guid: The Guid of the landscape.

get_landscape_components

Get the Components from landscape

unreal.PythonLandscapeLib.get_landscape_components(landscape_proxy) -> Array(LandscapeComponent)
    Get the Components from landscape

    Args:
        landscape_proxy (LandscapeProxy): The landscape instance.

    Returns:
        Array(LandscapeComponent): The Components of the landscape.

set_heightmap_data

Set height data for specified Landscape

unreal.PythonLandscapeLib.set_heightmap_data(landscape, height_data) -> bool
    Set height data for specified Landscape

    Args:
        landscape (LandscapeProxy): The target landscape instance.
        height_data (Array(int32)): The Height Data for landscape in flatten int list format. (0-65535)

    Returns:
        bool: Succeeded or not.

get_heightmap_data

Get height data for specified Landscape

unreal.PythonLandscapeLib.get_heightmap_data(landscape) -> Array(int32)
    Get height data for specified Landscape

    Args:
        landscape (LandscapeProxy): The landscape instance for query.

    Returns:
        Array(int32):

        height_data (Array(int32)): The Height Data of the landscape in flatten int list format. (0-65535)

cal_landscape_size

Calculate the Size of Landscape (the size of heightmap data).

unreal.PythonLandscapeLib.cal_landscape_size(section_size, sections_per_component, component_count_x, component_count_y) -> (out_size_x=int32, out_size_y=int32)
    Calculate the Size of Landscape (the size of heightmap data).

    Args:
        section_size (int32): The Section Size of the landscape.
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): The Height Data of the landscape in flatten int list format. (0-65535)
        component_count_y (int32): Number of components in Axis Y.

    Returns:
        tuple:

        out_size_x (int32): The size of landscape in Axis X, (ComponentCountX * QuadsPerComponent + 1).

        out_size_y (int32): The size of landscape in Axis Y.

landscape_get_grass_components

Get the HISM component for drawing GrassType.

unreal.PythonLandscapeLib.landscape_get_grass_components(landscape_proxy) -> Array(HierarchicalInstancedStaticMeshComponent)
    Get the HISM component for drawing GrassType.

    Args:
        landscape_proxy (LandscapeProxy): The landscape owned the GrassTypes.

    Returns:
        Array(HierarchicalInstancedStaticMeshComponent):

        out_grasses (Array(HierarchicalInstancedStaticMeshComponent)): The HISM component for drawing GrassTypes.

landscape_flush_grass_components

Flush the grass cache of landscape.

unreal.PythonLandscapeLib.landscape_flush_grass_components(landscape_proxy, flush_grass_maps=True) -> None
    Flush the grass cache of landscape.

    Args:
        landscape_proxy (LandscapeProxy):
        flush_grass_maps (bool): Flush GrassMaps or not.

PythonLevelLib

Function Name Description
remove_level_from_world Remove specified level from current world.
get_levels Get all levels in the world.

remove_level_from_world

Remove specified level from current world.

unreal.PythonLevelLib.remove_level_from_world(level_short_name) -> bool
    Remove specified level from current world.

    Args:
        level_short_name (str): The short name of level to be removed.

    Returns:
        bool: Succeed or not.

get_levels

Get all levels in the world.

unreal.PythonLevelLib.get_levels(world_in) -> Array(Level)
    Get all levels in the world.

    Args:
        world_in (World): The world owned the Levels.

    Returns:
        Array(Level): The Levels in the world.

PythonMaterialLib

Function Name Description
get_static_switch_parameter_values Get the Static Switch Infos of material instance
set_static_switch_parameter_value Set the Static Switch Infos of material instance
set_static_switch_parameters_values Batch set the Static Switch's status of material instance.
get_mf_static_switch_parameter Get the Static Switch Infos of material function.
get_static_parameters_summary Get the numbers of each StaticSwitchParameter of material instance.
log_mat Log out all the connections in the material
get_material_expressions Log out all the Material Expressions in the material
get_all_referenced_expressions Get Material Expressions in the material with specified feature level
get_material_connections Get all the connections in the material
get_material_function_connections Get all the connections in the material function
get_material_expression_input_names Get the input pin's names of the material expression
get_material_expression_output_names Get the output pin's names of the material expression
get_material_expression_captions The captions of the material expression
set_shading_model Set the shading model of the material, for the hidden shading model
get_material_expression_id Get the ParameterExpressionId of the material expression.
log_mf Log out all the connections in the material function
get_material_function_expressions Get all the expressions in the Material Function
get_material_function_output_expressions Get all the output expressions in the Material Function
get_selected_material_nodes Get the selected nodes in material editor.
log_material_expression Log Detail information of the MaterialExpression, include inputs, outputs etc.
log_editing_nodes Log Detail information of the Material or Material Function
get_selected_nodes_in_material_editor Get the selected nodes in material editor.
get_hlsl_code Get the HLSL code of the Material
get_shader_map_info Get the ShaderMaps infos in string format.
get_material_content Get the material's content in JSON Format
get_material_function_content Get the material function's content in JSON Format
connect_material_expressions Create connection between two material expressions
disconnect_expression Disconnection the material expression's input
connect_material_property Connect a material expression output to one of the material property inputs (e.g. diffuse color, world position offset etc)
disconnect_material_property Disconnect the material property input
get_material_proper_str_from_guid Get EMaterialProperty in string format from a guid
gen_guid_from_material_property_str Generate a Guid from EMaterialProperty
add_input_at_expression_set_material_attributes Add an Attribute Get Type pin for material expression "GetMaterialAttributes"
add_output_at_expression_get_material_attributes Add an Attribute Get Type pin for material expression "GetMaterialAttributes"

get_static_switch_parameter_values

Get the Static Switch Infos of material instance

unreal.PythonMaterialLib.get_static_switch_parameter_values(material_interface) -> Array(StaticSwitchInfo)
    Get the Static Switch Infos of material instance

    Args:
        material_interface (MaterialInterface): The material instance you want to query.

    Returns:
        Array(StaticSwitchInfo):

        out_static_parameters (Array(StaticSwitchInfo)): The result of static switch infos, (StaticSwitchInfo: name, value, override).

set_static_switch_parameter_value

Set the Static Switch Infos of material instance

unreal.PythonMaterialLib.set_static_switch_parameter_value(material_instance, switch_name, enabled, update_static_permutation=True) -> None
    Set the Static Switch Infos of material instance

    Args:
        material_instance (MaterialInstanceConstant):
        switch_name (str): The name of static switch.
        enabled (bool): Enabled the switch or not.
        update_static_permutation (bool): Update static permutation or not.

set_static_switch_parameters_values

Batch set the Static Switch's status of material instance.

unreal.PythonMaterialLib.set_static_switch_parameters_values(material_instance, switch_names, values, overrides) -> None
    Batch set the Static Switch's status of material instance.

    Args:
        material_instance (MaterialInstanceConstant):
        switch_names (Array(str)): The names of each static switches you want to set.
        values (Array(bool)): The bool values of each static switches.
        overrides (Array(bool)): The overrides bool values of each static switches.

get_mf_static_switch_parameter

Get the Static Switch Infos of material function.

unreal.PythonMaterialLib.get_mf_static_switch_parameter(material_function) -> Array(StaticSwitchInfo)
    Get the Static Switch Infos of material function.

    Args:
        material_function (MaterialFunction): The material function you want to query.

    Returns:
        Array(StaticSwitchInfo):

        out_static_parameters (Array(StaticSwitchInfo)): The result of static switch infos, (StaticSwitchInfo: name, value, override).

get_static_parameters_summary

Get the numbers of each StaticSwitchParameter of material instance.

unreal.PythonMaterialLib.get_static_parameters_summary(material_instance) -> (out_parameters_count=Array(int32), out_info=Array(str))
    Get the numbers of each StaticSwitchParameter of material instance.

    Args:
        material_instance (MaterialInstance):

    Returns:
        tuple:

        out_parameters_count (Array(int32)): The Count of each parameters: [StaticSwitchParameters, StaticComponentMaskParameters, TerrainLayerWeightParameters, MaterialLayersParameters]

        out_info (Array(str)): The name of each parameters.

log_mat

Log out all the connections in the material

unreal.PythonMaterialLib.log_mat(material_interface) -> None
    Log out all the connections in the material
    note: added in v1.0.8

    Args:
        material_interface (MaterialInterface): The source material

get_material_expressions

Log out all the Material Expressions in the material

unreal.PythonMaterialLib.get_material_expressions(material_interface) -> Array(MaterialExpression)
    Log out all the Material Expressions in the material
    note: added in v1.0.8

    Args:
        material_interface (MaterialInterface): The source material

    Returns:
        Array(MaterialExpression):

        out_expressions (Array(MaterialExpression)):

get_all_referenced_expressions

Get Material Expressions in the material with specified feature level

unreal.PythonMaterialLib.get_all_referenced_expressions(material_interface, feature_level=3) -> Array(MaterialExpression)
    Get Material Expressions in the material with specified feature level
    note: added in v1.0.8

    Args:
        material_interface (MaterialInterface): The source material
        feature_level (int32): ERHIFeatureLevel value in integer. 0: ES2_REMOVED, 1: ES3_1, 2: SM4_REMOVED, 3: SM_5, 4: SM6. Default == 3(SM_5)

    Returns:
        Array(MaterialExpression):

        out_expressions (Array(MaterialExpression)):

get_material_connections

Get all the connections in the material

unreal.PythonMaterialLib.get_material_connections(material_interface) -> Array(TAPythonMaterialConnection)
    Get all the connections in the material
    note: added in v1.0.8

    Args:
        material_interface (MaterialInterface): The source material

    Returns:
        Array(TAPythonMaterialConnection): The connections

get_material_function_connections

Get all the connections in the material function

unreal.PythonMaterialLib.get_material_function_connections(material_function) -> Array(TAPythonMaterialConnection)
    Get all the connections in the material function
    note: added in v1.0.8

    Args:
        material_function (MaterialFunction): The source material function

    Returns:
        Array(TAPythonMaterialConnection): The connections

get_material_expression_input_names

Get the input pin's names of the material expression

unreal.PythonMaterialLib.get_material_expression_input_names(expression, raw_name=False) -> Array(str)
    Get the input pin's names of the material expression
    note: added in v1.0.8

    Args:
        expression (MaterialExpression): The source material expression
        raw_name (bool): Set True will return the raw name that will not remove input type nor shorten the pin name. For instance the 'Input' will be none.

    Returns:
        Array(str): The input pin's names in array

get_material_expression_output_names

Get the output pin's names of the material expression

unreal.PythonMaterialLib.get_material_expression_output_names(expression) -> Array(str)
    Get the output pin's names of the material expression
    note: added in v1.0.8

    Args:
        expression (MaterialExpression): The source material expression

    Returns:
        Array(str): The output pin's names in array

get_material_expression_captions

The captions of the material expression

unreal.PythonMaterialLib.get_material_expression_captions(expression) -> Array(str)
    The captions of the material expression
    note: added in v1.0.8

    Args:
        expression (MaterialExpression): The source material expression

    Returns:
        Array(str): The captions in array

set_shading_model

Set the shading model of the material, for the hidden shading model

unreal.PythonMaterialLib.set_shading_model(material, shading_model_value) -> None
    Set the shading model of the material, for the hidden shading model
    note: added in v1.0.8

    Args:
        material (Material): The source material
        shading_model_value (int32): The int value of the EMaterialShadingModel

get_material_expression_id

Get the ParameterExpressionId of the material expression.

unreal.PythonMaterialLib.get_material_expression_id(expression) -> Guid
    Get the ParameterExpressionId of the material expression.
    note: added in v1.0.8

    Args:
        expression (MaterialExpression): The source expression material

    Returns:
        Guid: The ParameterExpressionId

log_mf

Log out all the connections in the material function

unreal.PythonMaterialLib.log_mf(material_function) -> None
    Log out all the connections in the material function
    note: added in v1.0.8

    Args:
        material_function (MaterialFunction): The source material expression

get_material_function_expressions

Get all the expressions in the Material Function

unreal.PythonMaterialLib.get_material_function_expressions(material_function, recursive=False) -> Array(MaterialExpression)
    Get all the expressions in the Material Function
    note: added in v1.0.8

    Args:
        material_function (MaterialFunction): The source material expression
        recursive (bool): Recursive or not

    Returns:
        Array(MaterialExpression):

        out_expressions (Array(MaterialExpression)):

get_material_function_output_expressions

Get all the output expressions in the Material Function

unreal.PythonMaterialLib.get_material_function_output_expressions(material_function) -> Array(MaterialExpressionFunctionOutput)
    Get all the output expressions in the Material Function
    note: added in v1.0.8

    Args:
        material_function (MaterialFunction): The source material expression

    Returns:
        Array(MaterialExpressionFunctionOutput):

        output_expressions (Array(MaterialExpressionFunctionOutput)):

get_selected_material_nodes

Get the selected nodes in material editor.

unreal.PythonMaterialLib.get_selected_material_nodes(material) -> Array(MaterialExpression)
    Get the selected nodes in material editor.
    note: Use this function in OnMaterialEditorMenu in MenuConfig.ini, the asset path of the material will be passed automatic.
    note: For example: unreal.PythonMaterialLib.get_selected_nodes_in_material_editor(unreal.load_asset(%asset_paths[0]))
    note: added in v1.0.8

    Args:
        material (Material): The editing material

    Returns:
        Array(MaterialExpression):

        out_expressions (Array(MaterialExpression)):

log_material_expression

Log Detail information of the MaterialExpression, include inputs, outputs etc.

unreal.PythonMaterialLib.log_material_expression(material_expression) -> None
    Log Detail information of the MaterialExpression, include inputs, outputs etc.
    note: added in v1.0.8

    Args:
        material_expression (MaterialExpression): The material expression you want to query.

log_editing_nodes

Log Detail information of the Material or Material Function

unreal.PythonMaterialLib.log_editing_nodes(material_or_mf) -> None
    Log Detail information of the Material or Material Function
    note: added in v1.0.8

    Args:
        material_or_mf (Object): The material or material function you want to query.

get_selected_nodes_in_material_editor

Get the selected nodes in material editor.

unreal.PythonMaterialLib.get_selected_nodes_in_material_editor(material_or_mf) -> Array(MaterialExpression)
    Get the selected nodes in material editor.
    note: The Material Root Node is not included.
    note: added in v1.0.8

    Args:
        material_or_mf (Object): The material or the material function you want to query.

    Returns:
        Array(MaterialExpression): The selected MaterialExpression nodes.

get_hlsl_code

Get the HLSL code of the Material

unreal.PythonMaterialLib.get_hlsl_code(material_interface) -> str or None
    Get the HLSL code of the Material
    note: The FeatureLevel if SM5
    note: added in v1.0.8

    Args:
        material_interface (MaterialInterface): The material you want to query.

    Returns:
        str or None: None or the HLSL source code

        out_source (str):

get_shader_map_info

Get the ShaderMaps infos in string format.

unreal.PythonMaterialLib.get_shader_map_info(material, platform_str, detail=False) -> str
    Get the ShaderMaps infos in string format.
    note: added in v1.0.8

    Args:
        material (Material): The material you want to query.
        platform_str (str): EShaderPlatform String: PCD3D_SM5, METAL, METAL_MRT, PCD3D_ES3_1, OPENGL_PCES3_1, METAL_SM5, VULKAN_PCES3_1, VULKAN_SM5, VULKAN_ES3_1_ANDROID, METAL_MACES3_1, OPENGL_ES3_1_ANDROID, METAL_MRT_MAC, METAL_TVOS, METAL_MRT_TVOS
        detail (bool): Log Detail ShaderMap or not

    Returns:
        str: The ShaderMap info content as JSON

get_material_content

Get the material's content in JSON Format

unreal.PythonMaterialLib.get_material_content(material, only_editable=True, include_comments=False) -> str
    Get the material's content in JSON Format
    note: added in v1.0.8

    Args:
        material (Material): The material you want to query.
        only_editable (bool): Get the Editable properties only or not.
        include_comments (bool): Include the Comments in Material Editor's graph or not.

    Returns:
        str: The material's content in JSON Format

get_material_function_content

Get the material function's content in JSON Format

unreal.PythonMaterialLib.get_material_function_content(material_function, only_editable=True, include_comments=False) -> str
    Get the material function's content in JSON Format
    note: added in v1.0.8

    Args:
        material_function (MaterialFunction): The material function you want to query.
        only_editable (bool): Get the Editable properties only or not.
        include_comments (bool): Include the Comments in Material Editor's graph or not.

    Returns:
        str: The material's content in JSON Format

connect_material_expressions

Create connection between two material expressions

unreal.PythonMaterialLib.connect_material_expressions(from_expression, from_output_name, to_expression, to_input_name) -> bool
    Create connection between two material expressions
    note: Same as the function in UMaterialEditingLibrary, add extra log when failed.
    note: added in v1.0.8

    Args:
        from_expression (MaterialExpression): Expression to make connection from
        from_output_name (str): Name of output of FromExpression to make connection from. Leave empty to use first output.
        to_expression (MaterialExpression): Expression to make connection to
        to_input_name (str): Name of input of ToExpression to make connection to. Leave empty to use first input.

    Returns:
        bool: True if connected

disconnect_expression

Disconnection the material expression's input

unreal.PythonMaterialLib.disconnect_expression(expression, input_name) -> bool
    Disconnection the material expression's input
    note: added in v1.0.8

    Args:
        expression (MaterialExpression): Expression
        input_name (str):

    Returns:
        bool: True if disconnected

connect_material_property

Connect a material expression output to one of the material property inputs (e.g. diffuse color, world position offset etc)

unreal.PythonMaterialLib.connect_material_property(from_expression, from_output_name, material_property_str) -> bool
    Connect a material expression output to one of the material property inputs (e.g. diffuse color,  world position offset etc)
    note: added in v1.0.8

    Args:
        from_expression (MaterialExpression): Expression to make connection from
        from_output_name (str): Name of output of FromExpression to make connection from
        material_property_str (str): EMaterialProperty value in string from. So we can connect to the "Hidden" Property, for instance: MP_WorldPositionOffset, MP_CustomData0,  MP_CustomizedUVs0 and so on

    Returns:
        bool: True if connected

disconnect_material_property

Disconnect the material property input

unreal.PythonMaterialLib.disconnect_material_property(material, material_property_str) -> bool
    Disconnect the material property input
    note: added in v1.0.8

    Args:
        material (Material): The target material
        material_property_str (str): EMaterialProperty value in string from. So we can connect to the "Hidden" Property, for instance: MP_WorldPositionOffset, MP_CustomData0,  MP_CustomizedUVs0 and so on

    Returns:
        bool: True if connected

get_material_proper_str_from_guid

Get EMaterialProperty in string format from a guid

unreal.PythonMaterialLib.get_material_proper_str_from_guid(guid) -> str
    Get EMaterialProperty in string format from a guid
    note: It's a python version of FMaterialAttributeDefinitionMap::GetProperty(guid)
    note: added in v1.0.8

    Args:
        guid (Guid): The Guid which used in AttributeGetTypes/AttributeSetTypes

    Returns:
        str: EMaterialProperty value in string

gen_guid_from_material_property_str

Generate a Guid from EMaterialProperty

unreal.PythonMaterialLib.gen_guid_from_material_property_str(property_str) -> Guid
    Generate a Guid from EMaterialProperty
    note: It's a python version of FMaterialAttributeDefinitionMap::GetID(Property)
    note: added in v1.0.8

    Args:
        property_str (str): EMaterialProperty String: MP_BaseColor, MP_Metallic, MP_Specular, MP_Normal, MP_WorldPositionOffset, MP_CustomData0, MP_CustomizedUVs0 and so on

    Returns:
        Guid: The new Guid

add_input_at_expression_set_material_attributes

Add an Attribute Get Type pin for material expression "GetMaterialAttributes"

unreal.PythonMaterialLib.add_input_at_expression_set_material_attributes(expression_set_material_attributes, property_str) -> None
    Add an Attribute Get Type pin for material expression "GetMaterialAttributes"
    note: added in v1.0.8

    Args:
        expression_set_material_attributes (MaterialExpressionSetMaterialAttributes): The target expression.
        property_str (str): EMaterialProperty String: MP_BaseColor, MP_Metallic, MP_Specular, MP_Normal, MP_WorldPositionOffset, MP_CustomData0, MP_CustomizedUVs0 and so on

add_output_at_expression_get_material_attributes

Add an Attribute Get Type pin for material expression "GetMaterialAttributes"

unreal.PythonMaterialLib.add_output_at_expression_get_material_attributes(expression_get_material_attributes, property_str) -> None
    Add an Attribute Get Type pin for material expression "GetMaterialAttributes"
    note: added in v1.0.8

    Args:
        expression_get_material_attributes (MaterialExpressionGetMaterialAttributes): The target expression.
        property_str (str): EMaterialProperty String: MP_BaseColor, MP_Metallic, MP_Specular, MP_Normal, MP_WorldPositionOffset, MP_CustomData0, MP_CustomizedUVs0 and so on

PythonMeshLib

Function Name Description
get_static_mesh_materials Get all Static Materials of static mesh.
set_static_mesh_materials Get all Static Materials of static mesh.
get_imported_original_mat_names Get the names from Mesh's ImportMaterialOriginalNameData of StaticMesh's ImportData
get_original_lod_data_count Get number of LODs from ImportMeshData. It's may not equal to the number of actual mesh asset, which can generate lods in editor.
get_original_lod_mat_names Get the Section Original Material Names from specified LOD of mesh.
is_this_lod_generated_by_mesh_reduction Is Specified LOD is generated in editor.
set_lod_section_material_slot_index Set Material Slot Index of Specified mesh LOD.
get_sectionl_cast_shadow Is specified section of LOD cast shadow.
get_overlapping_box_count Get the number of instances that overlap a given box
get_overlapping_sphere_count Get the number of instances that overlap a given sphere
get_static_mesh_sockets Get the static mesh sockets of the mesh object
set_static_mesh_sockets Set the static mesh sockets of the mesh object
set_static_mesh_socket_name Set the name of static mesh socket.
convert_procedural_mesh_to_static_mesh Convert the procedural mesh to static mesh asset
apply_nanite Set and Apply the Enable Nanite of static mesh asset. UE5 Only.

get_static_mesh_materials

Get all Static Materials of static mesh.

unreal.PythonMeshLib.get_static_mesh_materials(mesh) -> Array(StaticMaterial)
    Get all Static Materials of static mesh.

    Args:
        mesh (StaticMesh): The Static Mesh owned the Materials.

    Returns:
        Array(StaticMaterial):

        out_materials (Array(StaticMaterial)): The Static Materials of the mesh in list.

set_static_mesh_materials

Get all Static Materials of static mesh.

unreal.PythonMeshLib.set_static_mesh_materials(mesh, materials, slot_names) -> None
    Get all Static Materials of static mesh.

    Args:
        mesh (StaticMesh): The target static mesh.
        materials (Array(StaticMaterial)): The material list you want to set to the mesh.
        slot_names (Array(Name)): The new material slot names of the mesh.

get_imported_original_mat_names

Get the names from Mesh's ImportMaterialOriginalNameData of StaticMesh's ImportData

unreal.PythonMeshLib.get_imported_original_mat_names(mesh) -> Array(str) or None
    Get the names from Mesh's ImportMaterialOriginalNameData of StaticMesh's ImportData

    Args:
        mesh (StaticMesh): The target static mesh.

    Returns:
        Array(str) or None:

        out_material_names (Array(str)): The names in material original name data.

get_original_lod_data_count

Get number of LODs from ImportMeshData. It's may not equal to the number of actual mesh asset, which can generate lods in editor.

unreal.PythonMeshLib.get_original_lod_data_count(mesh) -> int32
    Get number of LODs from ImportMeshData. It's may not equal to the number of actual mesh asset, which can generate lods in editor.

    Args:
        mesh (StaticMesh): The target static mesh.

    Returns:
        int32: The number of LOD.

get_original_lod_mat_names

Get the Section Original Material Names from specified LOD of mesh.

unreal.PythonMeshLib.get_original_lod_mat_names(mesh, lod_level) -> Array(str) or None
    Get the Section Original Material Names from specified LOD of mesh.

    Args:
        mesh (StaticMesh): The target static mesh.
        lod_level (int32): Specified LOD level.

    Returns:
        Array(str) or None:

        out_material_names (Array(str)): The Material's names.

is_this_lod_generated_by_mesh_reduction

Is Specified LOD is generated in editor.

unreal.PythonMeshLib.is_this_lod_generated_by_mesh_reduction(mesh, lod_level) -> bool
    Is Specified LOD is generated in editor.
    result: Whether this LOD's mesh is generated in editor or not.

    Args:
        mesh (StaticMesh): The target static mesh.
        lod_level (int32): Specified LOD level.

    Returns:
        bool:

set_lod_section_material_slot_index

Set Material Slot Index of Specified mesh LOD.

unreal.PythonMeshLib.set_lod_section_material_slot_index(static_mesh, lod_index, section_index, new_material_slot_index, new_material_slot_name) -> None
    Set Material Slot Index of Specified mesh LOD.

    Args:
        static_mesh (StaticMesh):
        lod_index (int32):
        section_index (int32): The section index of LOD.
        new_material_slot_index (int32): The new material slot index for the section.
        new_material_slot_name (Name): The name for material slot.

get_sectionl_cast_shadow

Is specified section of LOD cast shadow.

unreal.PythonMeshLib.get_sectionl_cast_shadow(static_mesh, lod_level, section_id) -> bool
    Is specified section of LOD cast shadow.
    result: Whether this section of mesh cast shadow.

    Args:
        static_mesh (StaticMesh):
        lod_level (int32): Specified LOD level.
        section_id (int32): Specified section id of LOD.

    Returns:
        bool:

get_overlapping_box_count

Get the number of instances that overlap a given box

unreal.PythonMeshLib.get_overlapping_box_count(hism, box) -> int32
    Get the number of instances that overlap a given box
    result: The overlapped number of instances.

    Args:
        hism (HierarchicalInstancedStaticMeshComponent): The target HierarchicalInstancedStaticMeshComponent.
        box (Box): Box for overlapping test.

    Returns:
        int32:

get_overlapping_sphere_count

Get the number of instances that overlap a given sphere

unreal.PythonMeshLib.get_overlapping_sphere_count(hism, sphere_center, sphere_radius) -> int32
    Get the number of instances that overlap a given sphere
    result: The overlapped number of instances.

    Args:
        hism (HierarchicalInstancedStaticMeshComponent): The target HierarchicalInstancedStaticMeshComponent.
        sphere_center (Vector): The center position of Sphere for overlapping test.
        sphere_radius (float): The radius of Sphere.

    Returns:
        int32:

get_static_mesh_sockets

Get the static mesh sockets of the mesh object

unreal.PythonMeshLib.get_static_mesh_sockets(obj) -> Array(StaticMeshSocket)
    Get the static mesh sockets of the mesh object
    result: The static mesh sockets of the mesh.

    Args:
        obj (Object): The target mesh.

    Returns:
        Array(StaticMeshSocket):

set_static_mesh_sockets

Set the static mesh sockets of the mesh object

unreal.PythonMeshLib.set_static_mesh_sockets(obj, sockets) -> bool
    Set the static mesh sockets of the mesh object
    result: Succeed or not.

    Args:
        obj (Object): The target mesh.
        sockets (Array(StaticMeshSocket)): The sockets for mesh.

    Returns:
        bool:

set_static_mesh_socket_name

Set the name of static mesh socket.

unreal.PythonMeshLib.set_static_mesh_socket_name(socket, socket_name) -> StaticMeshSocket
    Set the name of static mesh socket.
    result: The mesh socket.

    Args:
        socket (StaticMeshSocket): The target Socket.
        socket_name (Name): The new name of socket.

    Returns:
        StaticMeshSocket:

convert_procedural_mesh_to_static_mesh

Convert the procedural mesh to static mesh asset

unreal.PythonMeshLib.convert_procedural_mesh_to_static_mesh(proc_mesh_comp, package_path, recompute_normals=False, recompute_tangents=False, remove_degenerates=False, use_high_precision_tangent_basis=False, use_full_precision_u_vs=False, generate_lightmap_u_vs=True) -> None
    Convert the procedural mesh to static mesh asset

    Args:
        proc_mesh_comp (ProceduralMeshComponent): The ProcMeshComp mesh Component
        package_path (str): The StaticMesh Asset package path
        recompute_normals (bool): Recompute mesh normal or not, default = false
        recompute_tangents (bool): Recompute mesh tangents or not, default = false
        remove_degenerates (bool): Remove Degenerates triangles or not, default = false
        use_high_precision_tangent_basis (bool): Use high precision tangent basis or not, default = false
        use_full_precision_u_vs (bool): Stored UVs with full floating point precision or not, default = false
        generate_lightmap_u_vs (bool): Generate Lightmap UVs or not, default = true

apply_nanite

Set and Apply the Enable Nanite of static mesh asset. UE5 Only.

unreal.PythonMeshLib.apply_nanite(static_mesh, enable_nanite) -> None
    Set and Apply the Enable Nanite of static mesh asset. UE5 Only.
    note: This function will trigger Nanite mesh rebuild, which will cost several seconds or more.

    Args:
        static_mesh (StaticMesh): The target static mesh asset.
        enable_nanite (bool): Enable Nanite or not.

PythonStructLib

Function Name Description
log_var_desc Print out the detail infos of the given User Defined Struct. Include VarName, Category, Guid, PinValue and so on.
log_var_desc_by_friendly_name Print out the detail info of the specified Variable of User Defined Struct.
get_variable_description Get the content of VariableDescription of the specified Variable in User Defined Struct.
get_guid_from_friendly_name Get the Guid of specified Variable in User Defined Struct by friendly name.
get_guid_from_property_name Get the Guid of specified Variable in User Defined Struct by property name.
get_variable_names Get the Variable Names of specified User Defined Struct.
get_friendly_names Get the Friendly Names of specified User Defined Struct.
is_unique_friendly_name Query is the Friendly Name unique or not.
add_variable Add a new variable to specified User Defined Struct
add_directory_variable Add a new variable to specified User Defined Struct
remove_variable_by_name Remove the specified Variable in User Defined Struct by property name.
rename_variable None
change_variable_default_value Modify the default value of specified Variable in User Defined Struct.
get_variable_default_value None

log_var_desc

Print out the detail infos of the given User Defined Struct. Include VarName, Category, Guid, PinValue and so on.

unreal.PythonStructLib.log_var_desc(struct) -> None
    Print out the detail infos of the given User Defined Struct. Include VarName, Category, Guid, PinValue and so on.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to query.

log_var_desc_by_friendly_name

Print out the detail info of the specified Variable of User Defined Struct.

unreal.PythonStructLib.log_var_desc_by_friendly_name(struct, var_name) -> None
    Print out the detail info of the specified Variable of User Defined Struct.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to query.
        var_name (str): The friend name of the specified variable.

get_variable_description

Get the content of VariableDescription of the specified Variable in User Defined Struct.

unreal.PythonStructLib.get_variable_description(struct, friendly_name) -> Map(str, str)
    Get the content of VariableDescription of the specified Variable in User Defined Struct.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to query.
        friendly_name (str): The friend name of the specified variable.

    Returns:
        Map(str, str): The content of VariableDescription as a Key, Value String Map.

get_guid_from_friendly_name

Get the Guid of specified Variable in User Defined Struct by friendly name.

unreal.PythonStructLib.get_guid_from_friendly_name(struct, friendly_name) -> Guid
    Get the Guid of specified Variable in User Defined Struct by friendly name.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to query.
        friendly_name (str): The friendly name of the variable.

    Returns:
        Guid: The Guid of the variable.

get_guid_from_property_name

Get the Guid of specified Variable in User Defined Struct by property name.

unreal.PythonStructLib.get_guid_from_property_name(name) -> Guid
    Get the Guid of specified Variable in User Defined Struct by property name.
    note: The Guid of a Property Name is independent of which struct it belongs to

    Args:
        name (Name): The Property name of the Property variable.

    Returns:
        Guid: The Guid of the variable.

get_variable_names

Get the Variable Names of specified User Defined Struct.

unreal.PythonStructLib.get_variable_names(struct) -> Array(Name)
    Get the Variable Names of specified User Defined Struct.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to query.

    Returns:
        Array(Name): The variable name list.

get_friendly_names

Get the Friendly Names of specified User Defined Struct.

unreal.PythonStructLib.get_friendly_names(struct) -> Array(str)
    Get the Friendly Names of specified User Defined Struct.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to query.

    Returns:
        Array(str): The friendly names list.

is_unique_friendly_name

Query is the Friendly Name unique or not.

unreal.PythonStructLib.is_unique_friendly_name(struct, friendly_name) -> bool
    Query is the Friendly Name unique or not.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to query.
        friendly_name (str): The New Friendly Name

    Returns:
        bool: True if the friendly name is unique in the struct.

add_variable

Add a new variable to specified User Defined Struct

unreal.PythonStructLib.add_variable(struct, category, sub_category, sub_category_object, container_type_value, is_reference=False, friendly_name="") -> bool
    Add a new variable to specified User Defined Struct
    note: More example can be found in the website, or print out a exists variable with log_var_desc_by_friendly_name for reference.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to modify.
        category (Name): The Category of the new Variable
        sub_category (Name): The SubCategory of the new Variable
        sub_category_object (Object): The SubCategoryObject of the new Variable
        container_type_value (int32): Container type. 0: single, 1: array, 2: set. Use add_directory_variable if you want add a dict variable
        is_reference (bool): Whether e new Variable passed as reference
        friendly_name (str): Friendly name of the new variable

    Returns:
        bool: True if the new variable has been added

add_directory_variable

Add a new variable to specified User Defined Struct

unreal.PythonStructLib.add_directory_variable(struct, category, sub_category, sub_category_object, terminal_category, terminal_sub_category, terminal_sub_category_object, is_reference=False, friendly_name="") -> bool
    Add a new variable to specified User Defined Struct
    note: More example can be found in the website, or print out a exists variable with log_var_desc_by_friendly_name for reference.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to modify.
        category (Name): The Category of the new Variable's key
        sub_category (Name): The SubCategory of the new Variable's key
        sub_category_object (Object): The SubCategoryObject of the new Variable's key
        terminal_category (Name): The Category of the new Variable's value
        terminal_sub_category (Name): The SubCategory of the new Variable's value
        terminal_sub_category_object (Object): The SubCategoryObject of the new Variable's value
        is_reference (bool): Whether e new Variable passed as reference
        friendly_name (str): Friendly name of the new variable

    Returns:
        bool: True if the new variable has been added

remove_variable_by_name

Remove the specified Variable in User Defined Struct by property name.

unreal.PythonStructLib.remove_variable_by_name(struct, var_name) -> bool
    Remove the specified Variable in User Defined Struct by property name.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to modify.
        var_name (Name): The Property name of the variable.

    Returns:
        bool: None

rename_variable

unreal.PythonStructLib.rename_variable(struct, var_guid, new_friendly_name) -> bool
    Rename Variable

    Args:
        struct (UserDefinedStruct):
        var_guid (Guid):
        new_friendly_name (str):

    Returns:
        bool:

change_variable_default_value

Modify the default value of specified Variable in User Defined Struct.

unreal.PythonStructLib.change_variable_default_value(struct, var_guid, new_default_value) -> bool
    Modify the default value of specified Variable in User Defined Struct.

    Args:
        struct (UserDefinedStruct): The User Defined Struct you want to modify.
        var_guid (Guid): The Guid of the variable.
        new_default_value (str): The new default value in string format.

    Returns:
        bool: True if the default value has been set

get_variable_default_value

unreal.PythonStructLib.get_variable_default_value(struct, var_guid) -> str
    Get Variable Default Value

    Args:
        struct (UserDefinedStruct):
        var_guid (Guid):

    Returns:
        str:

PythonTextureLib

Function Name Description
create_texture2d_from_raw Create a Texture2D from pixel RawData
set_render_target_data Set the RenderTexture2D By Raw Data.
get_render_target_raw_data Get the Raw Data from RenderTarget2D

create_texture2d_from_raw

Create a Texture2D from pixel RawData

unreal.PythonTextureLib.create_texture2d_from_raw(raw_data, width, height, channel_num, use_srgb=False, texture_filter_value=-1, bgr=False) -> Texture2D
    Create a Texture2D from pixel RawData
    note: The Texture2D type is EPixelFormat::PF_R8G8B8A8
    note: added in v1.0.7

    Args:
        raw_data (Array(uint8)): The flatten uint8 raw data of image, len(RawData) == RawDataWidth * RawDataHeight * RawDataChannelNum
        width (int32): The width of the Texture2D
        height (int32): The Height of the Texture2D
        channel_num (int32): The Number of RawData's Channel. 1: grayscale; 2: grayscale with alpha; 3: rgb; 4 rgb with alpha
        use_srgb (bool): Use SRGB or no0t
        texture_filter_value (int32): The filter of texture: 0: Nearest, 1: Bilinear, 2: Trilinear, 3: Use setting from the Texture Group.
        bgr (bool): Is the order of RawData is Blue, Green, Red, otherwise RGB

    Returns:
        Texture2D: The created Texture2D

set_render_target_data

Set the RenderTexture2D By Raw Data.

unreal.PythonTextureLib.set_render_target_data(render_target_texture, raw_data, raw_data_width, raw_data_height, raw_data_channel_num, use_srgb=False, texture_filter_value=-1, bgr=False) -> None
    Set the RenderTexture2D By Raw Data.
    note: The order of RawData is row first. Lower left corner is the first pixel, and upper right is the last
    note: added in v1.0.7

    Args:
        render_target_texture (TextureRenderTarget2D): The target RenderTarget2D
        raw_data (Array(uint8)): The flatten uint8 raw data of image, len(RawData) == RawDataWidth * RawDataHeight * RawDataChannelNum
        raw_data_width (int32): The width of the RawData, we can fill the rt with smaller RawData
        raw_data_height (int32): The Height of the RawData
        raw_data_channel_num (int32): The Number of RawData's Channel. 1: grayscale; 2: grayscale with alpha; 3: rgb; 4 rgb with alpha
        use_srgb (bool): Use SRGB or not
        texture_filter_value (int32): The filter of texture: 0: Nearest, 1: Bilinear, 2: Trilinear, Use setting from the Texture Group.
        bgr (bool): Is the order of RawData is Blue, Green, Red, otherwise RGB

get_render_target_raw_data

Get the Raw Data from RenderTarget2D

unreal.PythonTextureLib.get_render_target_raw_data(render_target_texture) -> Array(uint8)
    Get the Raw Data from RenderTarget2D
    note: added in v1.0.7

    Args:
        render_target_texture (TextureRenderTarget2D): The source RenderTarget2D

    Returns:
        Array(uint8):

        out_raw_data (Array(uint8)):


Share On
Reddit