unreal.DataprepOperationsLibrary
¶
-
class
unreal.
DataprepOperationsLibrary
(outer=None, name='None')¶ Bases:
unreal.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.
Add tags to a set of actors
-
classmethod
add_to_layer
(selected_objects, layer_name) → None¶ Add all Actors to a given layer. This operation only applies on assets:
-
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.
-
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
transform_type (RandomizeTransformType) –
reference_frame (RandomizeTransformReferenceFrame) –
min (Vector) –
max (Vector) –
-
classmethod
set_convex_decomposition_collision
(selected_objects, hull_count, max_hull_verts, hull_precision)¶ Add complex collision on the static meshes contained in the input array by the actors contained in the input array 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
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
-
classmethod
set_lod_group
(selected_objects) -> (lod_group_name=Name, modified_objects=Array(Object))¶ Remove inputs content Static meshes are not re-built after the new LOD groups are set:
-
classmethod
set_lods
(selected_objects, reduction_options)¶ Generate LODs on the static meshes contained in the input array by the actors contained in the input array 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
selected_objects (Array(Object)) – Array of UObjects to process.
reduction_options (EditorScriptingMeshReductionOptions) – Options on how to generate LODs on the mesh.
- Returns
modified_objects (Array(Object)):
- Return type
-
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
selected_objects (Array(Object)) – Objects to set the input material on
material_substitute (MaterialInterface) –
-
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 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_simple_collision
(selected_objects, shape_type)¶ 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 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
shape_type (ScriptingCollisionShapeType) – Options on which simple collision to add to the mesh.
- Returns
modified_objects (Array(Object)):
- Return type
-
classmethod
set_sub_ouput_folder
(selected_objects, sub_folder_name) → None¶ Add/Edit UDataprepConsumerUserData with the requested name for the sub-folder This operation only applies on assets:
-
classmethod
set_sub_ouput_level
(selected_objects, sub_level_name) → None¶ Add/Edit UDataprepConsumerUserData with the requested name for the sub-level This operation only applies on actors:
-
classmethod
substitute_material
(selected_objects, material_search, string_match, material_substitute) → None¶ Replaces designated materials in all or specific content folders with specific ones A material override will be added to static mesh components if their attached static mesh uses the searched material but not themselves:
- Parameters
material_search (str) –
string_match (EditorScriptingStringMatchType) –
material_substitute (MaterialInterface) –
-
classmethod
substitute_materials_by_table
(selected_objects, data_table) → None¶ Replaces designated materials in all or specific content folders with requested ones SubstituteMaterial is called for each entry of the input data table:
-
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
mesh_search (str) –
string_match (EditorScriptingStringMatchType) –
mesh_substitute (StaticMesh) –