unreal.GeometryScript_AssetUtils

class unreal.GeometryScript_AssetUtils(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Although the class name indicates StaticMeshFunctions, that was a naming mistake that is difficult to correct. This class is intended to serve as a generic asset utils function library. The naming issue is only visible at the C++ level. It is not visible in Python or BP.

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: MeshAssetFunctions.h

classmethod check_static_mesh_has_available_lod(static_mesh_asset, requested_lod, debug=None) GeometryScriptSearchOutcomePins or None

Check if a Static Mesh Asset has the RequestedLOD available, ie if CopyMeshFromStaticMesh will be able to succeed for the given LODType and LODIndex.

Parameters:
Returns:

outcome (GeometryScriptSearchOutcomePins):

Return type:

GeometryScriptSearchOutcomePins or None

classmethod copy_mesh_from_skeletal_mesh(from_skeletal_mesh_asset, to_dynamic_mesh, asset_options, requested_lod, debug=None) -> (DynamicMesh, outcome=GeometryScriptOutcomePins)

Extracts a Dynamic Mesh from a Skeletal Mesh Asset.

Parameters:
Returns:

outcome (GeometryScriptOutcomePins):

Return type:

GeometryScriptOutcomePins

classmethod copy_mesh_from_static_mesh(from_static_mesh_asset, to_dynamic_mesh, asset_options, requested_lod, debug=None) -> (DynamicMesh, outcome=GeometryScriptOutcomePins)

Extracts a Dynamic Mesh from a Static Mesh Asset.

Note that the LOD Index in RequestedLOD will be silently clamped to the available number of LODs (SourceModel or RenderData)

Parameters:
Returns:

outcome (GeometryScriptOutcomePins):

Return type:

GeometryScriptOutcomePins

classmethod copy_mesh_to_skeletal_mesh(from_dynamic_mesh, to_skeletal_mesh_asset, options, target_lod, debug=None) -> (DynamicMesh, outcome=GeometryScriptOutcomePins)

Updates a Skeletal Mesh Asset with new geometry and bone weights data from a Dynamic Mesh.

Parameters:
Returns:

outcome (GeometryScriptOutcomePins):

Return type:

GeometryScriptOutcomePins

classmethod copy_mesh_to_static_mesh(from_dynamic_mesh, to_static_mesh_asset, options, target_lod, debug=None) -> (DynamicMesh, outcome=GeometryScriptOutcomePins)

Updates a Static Mesh Asset with new geometry converted from a Dynamic Mesh.

Parameters:
Returns:

outcome (GeometryScriptOutcomePins):

Return type:

GeometryScriptOutcomePins

classmethod get_num_static_mesh_lo_ds_of_type(static_mesh_asset, lod_type=GeometryScriptLODType.SOURCE_MODEL) int32

Determine the number of available LODs of the requested LODType in a Static Mesh Asset

Parameters:
Return type:

int32

classmethod get_section_material_list_from_static_mesh(from_static_mesh_asset, requested_lod, debug=None) -> (material_list=Array[MaterialInterface], material_index=Array[int32], material_slot_names=Array[Name], outcome=GeometryScriptOutcomePins)

Extracts the Material List and corresponding Material Indices from the specified LOD of the Static Mesh Asset. The MaterialList is sorted by Section, so if CopyMeshToStaticMesh was used to create a DynamicMesh, then the returned MaterialList here will correspond to the MaterialIDs in that DynamicMesh (as each Static Mesh Section becomes a MaterialID, in-order). So, the returned MaterialList can be passed directly to (eg) a DynamicMeshComponent.

Parameters:
Returns:

material_list (Array[MaterialInterface]):

material_index (Array[int32]): this returned array is the same size as MaterialList, with each value the index of that Material in the StaticMesh Material List

material_slot_names (Array[Name]):

outcome (GeometryScriptOutcomePins):

Return type:

tuple