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:
target_mesh (DynamicMesh) –
new_triangle (IntVector) –
new_triangle_group_id (int32) –
defer_change_notifications (bool) –
debug (GeometryScriptDebug) –
- 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:
target_mesh (DynamicMesh) –
new_triangles_list (GeometryScriptTriangleList) –
new_triangle_group_id (int32) –
defer_change_notifications (bool) –
debug (GeometryScriptDebug) –
- Returns:
new_indices_list (GeometryScriptIndexList):
- Return type:
- 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:
target_mesh (DynamicMesh) –
new_position (Vector) –
defer_change_notifications (bool) –
- 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:
target_mesh (DynamicMesh) –
new_positions_list (GeometryScriptVectorList) –
defer_change_notifications (bool) –
- Returns:
new_indices_list (GeometryScriptIndexList):
- Return type:
- 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:
target_mesh (DynamicMesh) –
buffers (GeometryScriptSimpleMeshBuffers) –
material_id (int32) –
defer_change_notifications (bool) –
debug (GeometryScriptDebug) –
- Returns:
new_triangle_indices_list (GeometryScriptIndexList):
- Return type:
- 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:
target_mesh (DynamicMesh) –
append_mesh (DynamicMesh) –
append_transform (Transform) –
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:
- 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:
- 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) –
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:
- 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:
target_mesh (DynamicMesh) –
selection (GeometryScriptMeshSelection) –
defer_change_notifications (bool) –
- 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:
- 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:
target_mesh (DynamicMesh) –
triangle_list (GeometryScriptIndexList) –
defer_change_notifications (bool) –
- 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:
- 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:
target_mesh (DynamicMesh) –
vertex_list (GeometryScriptIndexList) –
defer_change_notifications (bool) –
- Returns:
num_deleted (int32):
- Return type:
int32
- classmethod discard_mesh_attributes(target_mesh, defer_change_notifications=False) DynamicMesh ¶
Discard Mesh Attributes
- Parameters:
target_mesh (DynamicMesh) –
defer_change_notifications (bool) –
- Return type:
- 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:
target_mesh (DynamicMesh) –
position_list (GeometryScriptVectorList) – new vertex Positions. Size must be less than or equal to the MaxVertexID of TargetMesh (ie gaps are supported).
debug (GeometryScriptDebug) –
- Return type:
- classmethod set_vertex_position(target_mesh, vertex_id, new_position, defer_change_notifications=False) -> (DynamicMesh, is_valid_vertex=bool)¶
Set Vertex Position
- Parameters:
target_mesh (DynamicMesh) –
vertex_id (int32) –
new_position (Vector) –
defer_change_notifications (bool) –
- Returns:
is_valid_vertex (bool):
- Return type: