unreal.DataprepOperationsLibrary

class unreal.DataprepOperationsLibrary(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: BlueprintFunctionLibrary

Dataprep Operations Library

C++ Source:

  • Plugin: DataprepEditor

  • Module: DataprepLibraries

  • File: DataprepOperationsLibrary.h

classmethod add_metadata(selected_objects, metadata) None

Adds metadata to selected objects that implement the UInterface_AssetUserData interface.

Parameters:
classmethod add_tags(selected_objects, tags) None

Add tags to a set of actors

Parameters:
classmethod add_to_layer(selected_objects, layer_name) None

Add all Actors to a given layer. note: This operation only applies on assets

Parameters:
classmethod consolidate_objects(selected_objects) None

Replace all references to the assets in the array, except the first, with the first asset of the array.

Parameters:

selected_objects (Array[Object]) – Objects to consolidate

classmethod flip_faces(static_meshes) None

Flip the faces of all elements of a set of Static Meshes or Static Mesh Actors

Parameters:

static_meshes (Set[StaticMesh]) –

classmethod randomize_transform(selected_objects, transform_type, reference_frame, min, max) None

Alters transform of selected objects by appling randomly generated offset to one of the transform components (rotation, scale or translation)

Parameters:
classmethod resize_textures(textures, max_size) None

Resize textures to max width/height and optionally ensure power of two size. note: This operation only applies on assets

Parameters:
classmethod set_collision_complexity(selected_objects, collision_trace_flag) Array[Object]

Set collision complexity for selected meshes

Parameters:
Returns:

modified_objects (Array[Object]): List of modified meshes.

Return type:

Array[Object]

classmethod set_convex_decomposition_collision(selected_objects, hull_count, max_hull_verts, hull_precision) Array[Object]

Add complex collision on the static meshes contained in the input array by the actors contained in the input array remark:: Static meshes are not re-built after the new collision settings are set Generates an array of unique static meshes from the input array either by a cast if the UObject is a UStaticMesh or collecting the static meshes referred to if the UObject is a AActor Calls UEditorStaticMeshLibrary::SetConvexDecompositionCollisions on each static mesh of the resulting array. Note that any simple collisions on each static mesh of the resulting array will be removed.

Parameters:
  • selected_objects (Array[Object]) –

  • hull_count (int32) – Maximum number of convex pieces that will be created. Must be positive.

  • max_hull_verts (int32) – Maximum number of vertices allowed for any generated convex hull.

  • hull_precision (int32) – Number of voxels to use when generating collision. Must be positive.

Returns:

modified_objects (Array[Object]):

Return type:

Array[Object]

classmethod set_lod_group(selected_objects) -> (lod_group_name=Name, modified_objects=Array[Object])

Remove inputs content remark:: Static meshes are not re-built after the new LOD groups are set

Parameters:

selected_objects (Array[Object]) –

Returns:

lod_group_name (Name):

modified_objects (Array[Object]):

Return type:

tuple

classmethod set_lods(selected_objects, reduction_options) Array[Object]

Generate LODs on the static meshes contained in the input array by the actors contained in the input array remark:: Static meshes are not re-built after the new LODs are set Generates an array of unique static meshes from the input array either by a cast if the UObject is a UStaticMesh or collecting the static meshes referred to if the UObject is a AActor Calls UEditorStaticMeshLibrary::SetLods on each static mesh of the resulting array.

Parameters:
Returns:

modified_objects (Array[Object]):

Return type:

Array[Object]

classmethod set_material(selected_objects, material_substitute) None

Set the material to all elements of a set of Static Meshes or Static Mesh Actors

Parameters:
classmethod set_mesh(selected_objects, mesh_substitute) None

Set the mesh to all elements of a set of Actors containing StaticMeshComponents

Parameters:
  • selected_objects (Array[Object]) – Objects to set the input mesh on

  • mesh_substitute (StaticMesh) – Mesh to use

classmethod set_mobility(selected_objects, mobility_type) None

Set mobility on a set of static mesh actors remark:: Only objects of class AStaticMeshActor will be considered

Parameters:
  • selected_objects (Array[Object]) – Objects to set mobility on

  • mobility_type (ComponentMobility) – Type of mobility to set on selected mesh actors

classmethod set_nanite_settings(selected_objects, enabled, position_precision, percent_triangles) Array[Object]

Set Nanite settings for selected meshes

Parameters:
  • selected_objects (Array[Object]) – Array of objects to process.

  • enabled (bool) – If true, Nanite data will be generated.

  • position_precision (int32) – Step size is 2^(-PositionPrecision) cm. MIN_int32 is auto.

  • percent_triangles (float) – Percentage of triangles to keep from LOD0. 1.0 = no reduction, 0.0 = no triangles.

Returns:

out_modified_objects (Array[Object]): List of modified objects the processed meshes will be added to

Return type:

Array[Object]

classmethod set_simple_collision(selected_objects, shape_type) Array[Object]

Set one simple collision of the given shape type on the static meshes contained in the input array or referred to by the actors contained in the input array remark:: Static meshes are not re-built after the new collision settings are set Generates an array of unique static meshes from the input array either by a cast if the UObject is a UStaticMesh or collecting the static meshes referred to if the UObject is a AActor Calls UEditorStaticMeshLibrary::RemoveCollisions to remove any existing collisions on each static mesh of the resulting array Calls UEditorStaticMeshLibrary::AddSimpleCollisions on each static mesh of the resulting array.

Parameters:
Returns:

modified_objects (Array[Object]):

Return type:

Array[Object]

classmethod set_sub_ouput_folder(selected_objects, sub_folder_name) None

Add/Edit UDataprepConsumerUserData with the requested name for the sub-folder note: This operation only applies on assets

Parameters:
classmethod set_sub_ouput_level(selected_objects, sub_level_name) None

Add/Edit UDataprepConsumerUserData with the requested name for the sub-level note: This operation only applies on actors

Parameters:
classmethod substitute_material(selected_objects, material_search, string_match, material_substitute) None

Replaces designated materials in all or specific content folders with specific ones remark:: A material override will be added to static mesh components if their attached static mesh uses the searched material but not themselves

Parameters:
classmethod substitute_materials_by_table(selected_objects, data_table) None

Replaces designated materials in all or specific content folders with requested ones remark:: SubstituteMaterial is called for each entry of the input data table

Parameters:
classmethod substitute_mesh(selected_objects, mesh_search, string_match, mesh_substitute) None

Replaces designated meshes in all or specific content folders with specific ones

Parameters: