unreal.GeometryScript_MeshDecomposition
¶
- class unreal.GeometryScript_MeshDecomposition(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Geometry Script Library Mesh Decomposition Functions
C++ Source:
Plugin: GeometryScripting
Module: GeometryScriptingCore
File: MeshDecompositionFunctions.h
- classmethod copy_mesh_selection_to_mesh(target_mesh, store_to_submesh, selection, append_to_existing=False, preserve_group_i_ds=False, debug=None) -> (DynamicMesh, store_to_submesh=DynamicMesh, store_to_submesh_out=DynamicMesh)¶
Extract the triangles identified by Selection from TargetMesh and copy/add them to StoreToSubmesh
- Parameters:
target_mesh (DynamicMesh) –
store_to_submesh (DynamicMesh) –
selection (GeometryScriptMeshSelection) –
append_to_existing (bool) – if false (default), StoreToSubmesh is cleared, otherwise selected triangles are appended
preserve_group_i_ds (bool) – if true, GroupIDs of triangles on TargetMesh are preserved in StoreToSubmesh. Otherwise new GroupIDs are allocated.
debug (GeometryScriptDebug) –
- Returns:
store_to_submesh (DynamicMesh):
store_to_submesh_out (DynamicMesh):
- Return type:
tuple
- classmethod copy_mesh_to_mesh(copy_from_mesh, copy_to_mesh, debug=None) -> (DynamicMesh, copy_to_mesh=DynamicMesh, copy_to_mesh_out=DynamicMesh)¶
Set CopyToMesh to be the same mesh as CopyFromMesh
- Parameters:
copy_from_mesh (DynamicMesh) –
copy_to_mesh (DynamicMesh) –
debug (GeometryScriptDebug) –
- Returns:
copy_to_mesh (DynamicMesh):
copy_to_mesh_out (DynamicMesh):
- Return type:
tuple
- classmethod get_sub_mesh_from_mesh(target_mesh, store_to_submesh, triangle_list, debug=None) -> (DynamicMesh, store_to_submesh=DynamicMesh, store_to_submesh_out=DynamicMesh)¶
CopyMeshSelectionToMesh should be used instead of this function
- Parameters:
target_mesh (DynamicMesh) –
store_to_submesh (DynamicMesh) –
triangle_list (GeometryScriptIndexList) –
debug (GeometryScriptDebug) –
- Returns:
store_to_submesh (DynamicMesh):
store_to_submesh_out (DynamicMesh):
- Return type:
tuple
- classmethod split_mesh_by_components(target_mesh, mesh_pool, debug=None) -> (DynamicMesh, component_meshes=Array[DynamicMesh])¶
Create a new Mesh for each Connected Component of TargetMesh. New meshes are drawn from MeshPool if it is provided, otherwise new UDynamicMesh instances are allocated
- Parameters:
target_mesh (DynamicMesh) –
mesh_pool (DynamicMeshPool) – New meshes in ComponentMeshes output list are allocated from this pool if it is provided (highly recommended!!)
debug (GeometryScriptDebug) –
- Returns:
component_meshes (Array[DynamicMesh]): New List of meshes is returned here
- Return type:
- classmethod split_mesh_by_material_i_ds(target_mesh, mesh_pool, debug=None) -> (DynamicMesh, component_meshes=Array[DynamicMesh], component_material_i_ds=Array[int32])¶
Create a new Mesh for each MaterialID of TargetMesh. New meshes are drawn from MeshPool if it is provided, otherwise new UDynamicMesh instances are allocated
- Parameters:
target_mesh (DynamicMesh) –
mesh_pool (DynamicMeshPool) – New meshes in ComponentMeshes output list are allocated from this pool if it is provided (highly recommended!!)
debug (GeometryScriptDebug) –
- Returns:
component_meshes (Array[DynamicMesh]): New List of meshes is returned here
component_material_i_ds (Array[int32]): MaterialID for each Mesh in ComponentMeshes is returned here
- Return type:
tuple
- classmethod split_mesh_by_polygroups(target_mesh, group_layer, mesh_pool, debug=None) -> (DynamicMesh, component_meshes=Array[DynamicMesh], component_polygroups=Array[int32])¶
Create a new Mesh for each Polygroup of TargetMesh. Note that this may be a large number of meshes! New meshes are drawn from MeshPool if it is provided, otherwise new UDynamicMesh instances are allocated
- Parameters:
target_mesh (DynamicMesh) –
group_layer (GeometryScriptGroupLayer) –
mesh_pool (DynamicMeshPool) – New meshes in ComponentMeshes output list are allocated from this pool if it is provided (highly recommended!!)
debug (GeometryScriptDebug) –
- Returns:
component_meshes (Array[DynamicMesh]): New List of meshes is returned here
component_polygroups (Array[int32]): Original Polygroup for each Mesh in ComponentMeshes is returned here
- Return type:
tuple