unreal.GeometryScript_MeshEdits

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

Bases: BlueprintFunctionLibrary

Geometry Script Library Mesh Basic Edit Functions

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: MeshBasicEditFunctions.h

classmethod add_triangle_to_mesh(target_mesh, new_triangle, new_triangle_group_id=0, defer_change_notifications=False, debug=None) -> (DynamicMesh, new_triangle_index=int32)

Adds a triangle (Vertex ID triplet) to the mesh and updates New Triangle Index with the resulting Triangle ID.

Parameters:
Returns:

new_triangle_index (int32):

Return type:

int32

classmethod add_triangles_to_mesh(target_mesh, new_triangles_list, new_triangle_group_id=0, defer_change_notifications=False, debug=None) -> (DynamicMesh, new_indices_list=GeometryScriptIndexList)

Adds a list of triangles to the mesh and populates the New Indices List with the corresponding new Triangle IDs.

Parameters:
Returns:

new_indices_list (GeometryScriptIndexList):

Return type:

GeometryScriptIndexList

classmethod add_vertex_to_mesh(target_mesh, new_position, defer_change_notifications=False) -> (DynamicMesh, new_vertex_index=int32)

Adds a new vertex to the mesh and returns a new Vertex ID (NewVertexIndex).

Parameters:
Returns:

new_vertex_index (int32):

Return type:

int32

classmethod add_vertices_to_mesh(target_mesh, new_positions_list, defer_change_notifications=False) -> (DynamicMesh, new_indices_list=GeometryScriptIndexList)

Adds a list of vertices to the mesh, and populates the NewIndicesList with the corresponding new Vertex IDs.

Parameters:
Returns:

new_indices_list (GeometryScriptIndexList):

Return type:

GeometryScriptIndexList

classmethod append_buffers_to_mesh(target_mesh, buffers, material_id=0, defer_change_notifications=False, debug=None) -> (DynamicMesh, new_triangle_indices_list=GeometryScriptIndexList)

Adds a set of vertices/triangles to the mesh, with Normals, UVs, and Colors; returning the new triangles indices

Parameters:
Returns:

new_triangle_indices_list (GeometryScriptIndexList):

Return type:

GeometryScriptIndexList

classmethod append_mesh(target_mesh, append_mesh, append_transform, defer_change_notifications=False, append_options=[GeometryScriptCombineAttributesMode.ENABLE_ALL_MATCHING], debug=None) DynamicMesh

Apply Append Transform to Append Mesh and then add its geometry to the Target Mesh.

Parameters:
Return type:

DynamicMesh

classmethod append_mesh_repeated(target_mesh, append_mesh, append_transform, repeat_count=1, apply_transform_to_first_instance=True, defer_change_notifications=False, append_options=[GeometryScriptCombineAttributesMode.ENABLE_ALL_MATCHING], debug=None) DynamicMesh

Repeatedly apply AppendTransform to the AppendMesh, each time adding the geometry to TargetMesh.

Parameters:
  • target_mesh (DynamicMesh)

  • append_mesh (DynamicMesh)

  • append_transform (Transform)

  • repeat_count (int32) – number of times to repeat the transform-append cycle

  • apply_transform_to_first_instance (bool) – if true, the AppendTransform is applied before the first mesh append, otherwise it is applied after

  • defer_change_notifications (bool)

  • append_options (GeometryScriptAppendMeshOptions) – Control how details like mesh attributes are handled when one mesh is appended to another

  • debug (GeometryScriptDebug)

Return type:

DynamicMesh

classmethod append_mesh_repeated_with_materials(target_mesh, target_mesh_material_list, append_mesh, append_mesh_material_list, append_transform, repeat_count=1, apply_transform_to_first_instance=True, defer_change_notifications=False, append_options=[GeometryScriptCombineAttributesMode.ENABLE_ALL_MATCHING], compact_appended_materials=True, debug=None) -> (DynamicMesh, result_mesh_material_list=Array[MaterialInterface])

Repeatedly apply AppendTransform to the AppendMesh, each time adding the geometry to TargetMesh. Also combines materials lists of the Target and Append meshes, and updates the output mesh materials to reference the combined list.

Parameters:
Returns:

result_mesh_material_list (Array[MaterialInterface]):

Return type:

Array[MaterialInterface]

classmethod append_mesh_transformed(target_mesh, append_mesh, append_transforms, constant_transform, constant_transform_is_relative=True, defer_change_notifications=False, append_options=[GeometryScriptCombineAttributesMode.ENABLE_ALL_MATCHING], debug=None) DynamicMesh

For each transform in AppendTransforms, apply the transform to AppendMesh and then add its geometry to the TargetMesh.

Parameters:
  • target_mesh (DynamicMesh)

  • append_mesh (DynamicMesh)

  • append_transforms (Array[Transform])

  • constant_transform (Transform) – the Constant transform will be applied after each Append transform

  • constant_transform_is_relative (bool) – if true, the Constant transform is applied “in the frame” of the Append Transform, otherwise it is applied as a second transform in local coordinates (ie rotate around the AppendTransform X axis, vs around the local X axis)

  • defer_change_notifications (bool)

  • append_options (GeometryScriptAppendMeshOptions) – Control how details like mesh attributes are handled when one mesh is appended to another

  • debug (GeometryScriptDebug)

Return type:

DynamicMesh

classmethod append_mesh_transformed_with_materials(target_mesh, target_mesh_material_list, append_mesh, append_mesh_material_list, append_transforms, constant_transform, constant_transform_is_relative=True, defer_change_notifications=False, append_options=[GeometryScriptCombineAttributesMode.ENABLE_ALL_MATCHING], compact_appended_materials=True, debug=None) -> (DynamicMesh, result_mesh_material_list=Array[MaterialInterface])

For each transform in AppendTransforms, apply the transform to AppendMesh and then add its geometry to the TargetMesh. Also combines materials lists of the Target and Append meshes, and updates the output mesh materials to reference the combined list.

Parameters:
  • target_mesh (DynamicMesh)

  • target_mesh_material_list (Array[MaterialInterface])

  • append_mesh (DynamicMesh)

  • append_mesh_material_list (Array[MaterialInterface])

  • append_transforms (Array[Transform])

  • constant_transform (Transform) – the Constant transform will be applied after each Append transform

  • constant_transform_is_relative (bool) – if true, the Constant transform is applied “in the frame” of the Append Transform, otherwise it is applied as a second transform in local coordinates (ie rotate around the AppendTransform X axis, vs around the local X axis)

  • defer_change_notifications (bool)

  • append_options (GeometryScriptAppendMeshOptions) – Control how details like mesh attributes are handled when one mesh is appended to another

  • compact_appended_materials (bool)

  • debug (GeometryScriptDebug)

Returns:

result_mesh_material_list (Array[MaterialInterface]):

Return type:

Array[MaterialInterface]

classmethod append_mesh_with_materials(target_mesh, target_mesh_material_list, append_mesh, append_mesh_material_list, append_transform, defer_change_notifications=False, append_options=[GeometryScriptCombineAttributesMode.ENABLE_ALL_MATCHING], compact_appended_materials=True, debug=None) -> (DynamicMesh, result_mesh_material_list=Array[MaterialInterface])

Apply Append Transform to Append Mesh and then add its geometry to the Target Mesh. Also combines materials lists of the Target and Append meshes, and updates the output mesh materials to reference the combined list.

Parameters:
Returns:

result_mesh_material_list (Array[MaterialInterface]):

Return type:

Array[MaterialInterface]

classmethod delete_selected_triangles_from_mesh(target_mesh, selection, defer_change_notifications=False) -> (DynamicMesh, num_deleted=int32)

Removes specified triangles, identified by mesh selection, from the mesh. On return, NumDeleted will contain the actual number of triangles removed.

Parameters:
Returns:

num_deleted (int32):

Return type:

int32

classmethod delete_triangle_from_mesh(target_mesh, triangle_id, defer_change_notifications=False) -> (DynamicMesh, was_triangle_deleted=bool)

Removes a triangle from the mesh as indicated by the Triangle ID. Should the delete fail, e.g. if the specified triangle was not a mesh element, the flag bWasTriangleDelete will be set to false.

Parameters:
  • target_mesh (DynamicMesh)

  • triangle_id (int32)

  • defer_change_notifications (bool)

Returns:

was_triangle_deleted (bool):

Return type:

bool

classmethod delete_triangles_from_mesh(target_mesh, triangle_list, defer_change_notifications=False) -> (DynamicMesh, num_deleted=int32)

Removes a list of triangles from the mesh. On return, NumDeleted will contain the actual number of triangles removed.

Parameters:
Returns:

num_deleted (int32):

Return type:

int32

classmethod delete_vertex_from_mesh(target_mesh, vertex_id, defer_change_notifications=False) -> (DynamicMesh, was_vertex_deleted=bool)

Removes a vertex from the mesh as indicated by the VertexID. Should the delete fail, e.g. if the specified vertex was not a mesh element, the flag bWasVertexDeleted will be set to false.

Parameters:
  • target_mesh (DynamicMesh)

  • vertex_id (int32)

  • defer_change_notifications (bool)

Returns:

was_vertex_deleted (bool):

Return type:

bool

classmethod delete_vertices_from_mesh(target_mesh, vertex_list, defer_change_notifications=False) -> (DynamicMesh, num_deleted=int32)

Removes a list of vertices from the mesh. On return, NumDeleted will contain the actual number of vertices removed.

Parameters:
Returns:

num_deleted (int32):

Return type:

int32

classmethod discard_mesh_attributes(target_mesh, defer_change_notifications=False) DynamicMesh

Discard Mesh Attributes

Parameters:
Return type:

DynamicMesh

classmethod set_all_mesh_vertex_positions(target_mesh, position_list, debug=None) DynamicMesh

Set all vertex positions in the TargetMesh to the specified Positions.

Parameters:
Return type:

DynamicMesh

classmethod set_vertex_position(target_mesh, vertex_id, new_position, defer_change_notifications=False) -> (DynamicMesh, is_valid_vertex=bool)

Set Vertex Position

Parameters:
Returns:

is_valid_vertex (bool):

Return type:

bool