unreal.DataPrepOperationsLibrary

class unreal.DataPrepOperationsLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

Data Prep Operations Library

C++ Source:

  • Plugin: DatasmithDataPrepEditor
  • Module: DatasmithDataPrepLibraries
  • File: DataPrepOperationsLibrary.h
classmethod compute_lightmap_resolution(objects, ideal_ratio=0.200000) → None

Sets the proper lightmap resolution to get the desired lightmap density ratio

Parameters:
  • objects (Array(Object)) – List of static meshes and static mesh actors to update.
  • ideal_ratio (float) – The desired lightmap density ratio
classmethod remove(objects) → None

Remove inputs content

Parameters:objects (Array(Object)) – Objects to remove
classmethod set_convex_decomposition_collision(selected_objects, hull_count, max_hull_verts, hull_precision) → None

Add complex collision on the static meshes contained in the input array by the actors contained in the input array

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. 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.
classmethod set_generate_lightmap_u_vs(assets, generate_lightmap_u_vs) → None

Sets the Generate Lightmap UVs flag on the static meshes found in the Assets list

Parameters:
  • assets (Array(Object)) – List of assets to set the generate lightmap uvs flag on. Only Static Meshes will be affected.
  • generate_lightmap_u_vs (bool) – The value to set for the generate lightmap uvs flag.
classmethod set_lod_group(selected_objects, lod_group_name) → None

Remove inputs content

Parameters:
classmethod set_lods(selected_objects, reduction_options) → None

Generate LODs on the static meshes contained in the input array by the actors contained in the input array

Parameters:
  • selected_objects (Array(Object)) – Array of UObjects to process.
  • reduction_options (EditorScriptingMeshReductionOptions) – Options on how to generate LODs on the mesh. 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.
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_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) → None

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

Parameters:
  • selected_objects (Array(Object)) –
  • shape_type (ScriptingCollisionShapeType) – Options on which simple collision to add to the mesh. 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.
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 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 SubstituteMaterial is called for each entry of the input data table:

Parameters: