unreal.EditableMesh
¶
- class unreal.EditableMesh(outer=None, name='None')¶
Bases:
unreal.Object
Editable Mesh
C++ Source:
Plugin: EditableMesh
Module: EditableMesh
File: EditableMesh.h
Editor Properties: (see get_editor_property/set_editor_property)
subdivision_count
(int32): [Read-Write] How many levels to subdivide this mesh. Zero will turn off subdivisionstexture_coordinate_count
(int32): [Read-Write] The number of texture coordinates stored on the vertices of this mesh
- any_changes_to_undo() → bool¶
- Returns
Returns true if there are any existing tracked changes that can be undo right now
- Return type
- assign_polygons_to_polygon_groups(polygon_group_for_polygons, delete_orphaned_polygon_groups) → None¶
Assign Polygons to Polygon Groups
- Parameters
polygon_group_for_polygons (Array(PolygonGroupForPolygon)) –
delete_orphaned_polygon_groups (bool) –
- bevel_polygons(polygon_i_ds, bevel_fixed_distance, bevel_progress_toward_center) -> (out_new_center_polygon_i_ds=Array(PolygonID), out_new_side_polygon_i_ds=Array(PolygonID))¶
Bevel Polygons
- change_polygons_vertex_instances(vertex_instances_for_polygons) → None¶
Change Polygons Vertex Instances
- Parameters
vertex_instances_for_polygons (Array(ChangeVertexInstancesForPolygon)) –
- commit_instance(component_to_instance_to) → EditableMesh¶
Commit Instance
- Parameters
component_to_instance_to (PrimitiveComponent) –
- Returns
- Return type
- compute_bounding_box_and_sphere() → BoxSphereBounds¶
Compute Bounding Box and Sphere
- Returns
- Return type
Compute Polygons Shared Edges
- create_edges(edges_to_create)¶
Create Edges
- Parameters
edges_to_create (Array(EdgeToCreate)) –
- Returns
out_new_edge_i_ds (Array(EdgeID)):
- Return type
- create_empty_vertex_range(num_vertices_to_create)¶
Create Empty Vertex Range
- create_missing_polygon_perimeter_edges(polygon_id)¶
Create Missing Polygon Perimeter Edges
- create_polygon_groups(polygon_groups_to_create)¶
Create Polygon Groups
- Parameters
polygon_groups_to_create (Array(PolygonGroupToCreate)) –
- Returns
out_new_polygon_group_i_ds (Array(PolygonGroupID)):
- Return type
- create_polygons(polygons_to_create) -> (out_new_polygon_i_ds=Array(PolygonID), out_new_edge_i_ds=Array(EdgeID))¶
Create Polygons
- Parameters
polygons_to_create (Array(PolygonToCreate)) –
- Returns
out_new_polygon_i_ds (Array(PolygonID)):
out_new_edge_i_ds (Array(EdgeID)):
- Return type
tuple
- create_vertex_instances(vertex_instances_to_create)¶
Create Vertex Instances
- Parameters
vertex_instances_to_create (Array(VertexInstanceToCreate)) –
- Returns
out_new_vertex_instance_i_ds (Array(VertexInstanceID)):
- Return type
- create_vertices(vertices_to_create)¶
Create Vertices
- Parameters
vertices_to_create (Array(VertexToCreate)) –
- Returns
out_new_vertex_i_ds (Array(VertexID)):
- Return type
- delete_edge_and_connected_polygons(edge_id, delete_orphaned_edges, delete_orphaned_vertices, delete_orphaned_vertex_instances, delete_empty_polygon_groups) → None¶
Delete Edge and Connected Polygons
- delete_polygon_groups(polygon_group_i_ds) → None¶
Delete Polygon Groups
- Parameters
polygon_group_i_ds (Array(PolygonGroupID)) –
- delete_polygons(polygon_i_ds_to_delete, delete_orphaned_edges, delete_orphaned_vertices, delete_orphaned_vertex_instances, delete_empty_polygon_groups) → None¶
Delete Polygons
- delete_vertex_and_connected_edges_and_polygons(vertex_id, delete_orphaned_edges, delete_orphaned_vertices, delete_orphaned_vertex_instances, delete_empty_polygon_groups) → None¶
Delete Vertex and Connected Edges and Polygons
- delete_vertex_instances(vertex_instance_i_ds_to_delete, delete_orphaned_vertices) → None¶
Delete Vertex Instances
- Parameters
vertex_instance_i_ds_to_delete (Array(VertexInstanceID)) –
delete_orphaned_vertices (bool) –
- extend_edges(edge_i_ds, weld_neighbors)¶
Extend Edges
- extend_vertices(vertex_i_ds, only_extend_closest_edge, reference_position)¶
Extend Vertices
- extrude_polygons(polygons, extrude_distance, keep_neighbors_together)¶
Extrude Polygons
- find_polygon_loop(edge_id) -> (out_edge_loop_edge_i_ds=Array(EdgeID), out_flipped_edge_i_ds=Array(EdgeID), out_reversed_edge_id_path_to_take=Array(EdgeID), out_polygon_i_ds_to_split=Array(PolygonID))¶
Find Polygon Loop
- Parameters
edge_id (EdgeID) –
- Returns
out_edge_loop_edge_i_ds (Array(EdgeID)):
out_flipped_edge_i_ds (Array(EdgeID)):
out_reversed_edge_id_path_to_take (Array(EdgeID)):
out_polygon_i_ds_to_split (Array(PolygonID)):
- Return type
tuple
- find_polygon_perimeter_edge_number_for_vertices(polygon_id, edge_vertex_id0, edge_vertex_id1) → int32¶
Find Polygon Perimeter Edge Number for Vertices
- find_polygon_perimeter_vertex_number_for_vertex(polygon_id, vertex_id) → int32¶
Find Polygon Perimeter Vertex Number for Vertex
- flip_polygons(polygon_i_ds) → None¶
todo: mesheditor: Not used for anything yet. Remove it? Use it during import/convert? UFUNCTION( BlueprintCallable, Category=”Editable Mesh” ) void SetEdgesVertices( const TArray<FVerticesForEdge>& VerticesForEdges ); UFUNCTION( BlueprintCallable, Category=”Editable Mesh” ) void InsertPolygonPerimeterVertices( const FPolygonID PolygonID, const int32 InsertBeforeVertexNumber, const TArray<FVertexAndAttributes>& VerticesToInsert ); UFUNCTION( BlueprintCallable, Category=”Editable Mesh” ) void RemovePolygonPerimeterVertices( const FPolygonID PolygonID, const int32 FirstVertexNumberToRemove, const int32 NumVerticesToRemove, const bool bDeleteOrphanedVertexInstances );
- get_edge_connected_polygon(edge_id, connected_polygon_number) → PolygonID¶
Returns the indexed polygon connected to this edge
- get_edge_connected_polygon_count(edge_id) → int32¶
Returns the number of polygons connected to this edge
- Parameters
edge_id (EdgeID) –
- Returns
- Return type
int32
- get_edge_connected_polygons(edge_id)¶
Get Edge Connected Polygons
- get_edge_count() → int32¶
Returns the number of edges in this mesh
- Returns
- Return type
int32
- get_edge_loop_elements(edge_id)¶
Get Edge Loop Elements
- get_edge_vertex(edge_id, edge_vertex_number) → VertexID¶
Returns the given indexed vertex for this edge. EdgeVertexNumber must be 0 or 1.
- get_edge_vertices(edge_id) -> (out_edge_vertex_id0=VertexID, out_edge_vertex_id1=VertexID)¶
Get Edge Vertices
- Parameters
edge_id (EdgeID) –
- Returns
out_edge_vertex_id0 (VertexID):
out_edge_vertex_id1 (VertexID):
- Return type
tuple
- get_first_valid_polygon_group() → PolygonGroupID¶
Get First Valid Polygon Group
- Returns
- Return type
- get_group_for_polygon(polygon_id) → PolygonGroupID¶
Returns the polygon group this polygon is assigned to
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
- get_polygon_adjacent_polygons(polygon_id)¶
Get Polygon Adjacent Polygons
- get_polygon_count() → int32¶
Returns the number of polygons in this mesh
- Returns
- Return type
int32
- get_polygon_count_in_group(polygon_group_id) → int32¶
Returns the number of polygons in this polygon group
- Parameters
polygon_group_id (PolygonGroupID) –
- Returns
- Return type
int32
- get_polygon_group_count() → int32¶
Returns the number of polygon groups in this mesh
- Returns
- Return type
int32
- get_polygon_in_group(polygon_group_id, polygon_number) → PolygonID¶
Returns the given indexed polygon in this polygon group
- Parameters
polygon_group_id (PolygonGroupID) –
polygon_number (int32) –
- Returns
- Return type
- get_polygon_perimeter_edge(polygon_id, perimeter_edge_number) -> (EdgeID, out_edge_winding_is_reversed_for_polygon=bool)¶
Get Polygon Perimeter Edge
- get_polygon_perimeter_edge_count(polygon_id) → int32¶
Get Polygon Perimeter Edge Count
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
int32
- get_polygon_perimeter_edges(polygon_id)¶
Get Polygon Perimeter Edges
- get_polygon_perimeter_vertex(polygon_id, polygon_vertex_number) → VertexID¶
Returns the indexed vertex on this polygon’s perimeter
- get_polygon_perimeter_vertex_count(polygon_id) → int32¶
Returns the number of vertices on this polygon’s perimeter
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
int32
- get_polygon_perimeter_vertex_instance(polygon_id, polygon_vertex_number) → VertexInstanceID¶
Returns the indexed vertex instance on this polygon’s perimeter
- Parameters
polygon_id (PolygonID) –
polygon_vertex_number (int32) –
- Returns
- Return type
- get_polygon_perimeter_vertex_instances(polygon_id)¶
Get Polygon Perimeter Vertex Instances
- Parameters
polygon_id (PolygonID) –
- Returns
out_polygon_perimeter_vertex_instance_i_ds (Array(VertexInstanceID)):
- Return type
- get_polygon_perimeter_vertices(polygon_id)¶
Get Polygon Perimeter Vertices
- get_polygon_triangulated_triangle(polygon_id, polygon_triangle_number) → TriangleID¶
Returns the indexed triangle of the triangulated polygon
- Parameters
polygon_id (PolygonID) –
polygon_triangle_number (int32) –
- Returns
- Return type
- get_polygon_triangulated_triangle_count(polygon_id) → int32¶
Returns the number of triangles which make up this polygon
- Parameters
polygon_id (PolygonID) –
- Returns
- Return type
int32
- get_subdivision_count() → int32¶
Get Subdivision Count
- Returns
- Return type
int32
- get_subdivision_limit_data() → SubdivisionLimitData¶
Get Subdivision Limit Data
- Returns
- Return type
- get_texture_coordinate_count() → int32¶
Get Texture Coordinate Count
- Returns
- Return type
int32
- get_vertex_adjacent_vertices(vertex_id)¶
Get Vertex Adjacent Vertices
- get_vertex_connected_edge(vertex_id, connected_edge_number) → EdgeID¶
Returns the requested edge connected to this vertex
- get_vertex_connected_edge_count(vertex_id) → int32¶
Returns the number of edges connected to this vertex
- Parameters
vertex_id (VertexID) –
- Returns
- Return type
int32
- get_vertex_connected_edges(vertex_id)¶
Get Vertex Connected Edges
- get_vertex_connected_polygons(vertex_id)¶
Get Vertex Connected Polygons
- get_vertex_count() → int32¶
Returns the number of vertices in this mesh
- Returns
- Return type
int32
- get_vertex_instance_connected_polygon(vertex_instance_id, connected_polygon_number) → PolygonID¶
Returns the indexed polygon connected to this vertex instance
- Parameters
vertex_instance_id (VertexInstanceID) –
connected_polygon_number (int32) –
- Returns
- Return type
- get_vertex_instance_connected_polygon_count(vertex_instance_id) → int32¶
Returns the number of polygons connected to this vertex instance
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
- Return type
int32
- get_vertex_instance_connected_polygons(vertex_instance_id)¶
Get Vertex Instance Connected Polygons
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
out_connected_polygon_i_ds (Array(PolygonID)):
- Return type
- get_vertex_instance_count() → int32¶
Returns the number of vertex instances in this mesh
- Returns
- Return type
int32
- get_vertex_instance_vertex(vertex_instance_id) → VertexID¶
Returns the vertex ID which the given vertex instance is instancing
- Parameters
vertex_instance_id (VertexInstanceID) –
- Returns
- Return type
- get_vertex_pair_edge(vertex_id, next_vertex_id) -> (EdgeID, out_edge_winding_is_reversed=bool)¶
Get Vertex Pair Edge
- insert_edge_loop(edge_id, splits)¶
Insert Edge Loop
- inset_polygons(polygon_i_ds, inset_fixed_distance, inset_progress_toward_center, mode) -> (out_new_center_polygon_i_ds=Array(PolygonID), out_new_side_polygon_i_ds=Array(PolygonID))¶
Inset Polygons
- Parameters
inset_fixed_distance (float) –
inset_progress_toward_center (float) –
mode (InsetPolygonsMode) –
- Returns
out_new_center_polygon_i_ds (Array(PolygonID)):
out_new_side_polygon_i_ds (Array(PolygonID)):
- Return type
tuple
- classmethod invalid_polygon_group_id() → PolygonGroupID¶
Invalid Polygon Group ID
- Returns
- Return type
- is_being_modified() → bool¶
- Returns
Returns true if StartModification() was called and the mesh is able to be modified currently. Remember to call EndModification() when finished.
- Return type
- is_spatial_database_allowed() → bool¶
- Returns
Returns true if our octree spatial database is enabled for this mesh
- Return type
- is_valid_polygon_group(polygon_group_id) → bool¶
Returns whether the given polygon group ID is valid
- Parameters
polygon_group_id (PolygonGroupID) –
- Returns
- Return type
- classmethod make_edge_id(edge_index) → EdgeID¶
Make Edge ID
- Parameters
edge_index (int32) –
- Returns
- Return type
- classmethod make_polygon_group_id(polygon_group_index) → PolygonGroupID¶
Make Polygon Group ID
- Parameters
polygon_group_index (int32) –
- Returns
- Return type
- classmethod make_polygon_id(polygon_index) → PolygonID¶
Make Polygon ID
- Parameters
polygon_index (int32) –
- Returns
- Return type
- classmethod make_vertex_id(vertex_index) → VertexID¶
Make Vertex ID
- Parameters
vertex_index (int32) –
- Returns
- Return type
- move_vertices(vertices_to_move) → None¶
Move Vertices
- Parameters
vertices_to_move (Array(VertexToMove)) –
- quadrangulate_mesh()¶
Quadrangulate Mesh
- revert_instance() → EditableMesh¶
Revert Instance
- Returns
- Return type
- search_spatial_database_for_polygons_in_volume(planes)¶
Search Spatial Database for Polygons in Volume
- search_spatial_database_for_polygons_potentially_intersecting_line_segment(line_segment_start, line_segment_end)¶
Search Spatial Database for Polygons Potentially Intersecting Line Segment
- search_spatial_database_for_polygons_potentially_intersecting_plane(plane)¶
Search Spatial Database for Polygons Potentially Intersecting Plane
- set_allow_compact(allow_compact) → None¶
Sets whether the mesh can be sporadically compacted as modifications are performed
- Parameters
allow_compact (bool) – True if compaction is enabled on this mesh.
- set_allow_spatial_database(allow_spatial_database) → None¶
Sets whether this mesh should automatically generate and maintain an octree spatial database. Certain queries may only be supported when the mesh has an octree generated. The octree is never saved or loaded, and always generated on demand. This feature adds significant overhead to editable mesh initialization and modification, so only use it if you really need to.
- Parameters
allow_spatial_database (bool) – True if an octree should be generated and maintained for this mesh.
- set_allow_undo(allow_undo) → None¶
Sets whether undo is allowed on this mesh
- Parameters
allow_undo (bool) – True if undo features are enabled on this mesh. You’re only allowed to call MakeUndo() if this is set to true.
- set_edges_attributes(attributes_for_edges) → None¶
Set Edges Attributes
- Parameters
attributes_for_edges (Array(AttributesForEdge)) –
- set_edges_crease_sharpness(edge_i_ds, edges_new_crease_sharpness) → None¶
Set Edges Crease Sharpness
- set_edges_hardness_automatically(edge_i_ds, max_dot_product_for_soft_edge) → None¶
Set Edges Hardness Automatically
- set_polygons_vertex_attributes(vertex_attributes_for_polygons) → None¶
Set Polygons Vertex Attributes
- Parameters
vertex_attributes_for_polygons (Array(VertexAttributesForPolygon)) –
- set_subdivision_count(new_subdivision_count) → None¶
Set Subdivision Count
- Parameters
new_subdivision_count (int32) –
- set_texture_coordinate_count(num_tex_coords) → None¶
Set Texture Coordinate Count
- Parameters
num_tex_coords (int32) –
- set_vertex_instances_attributes(attributes_for_vertex_instances) → None¶
Set Vertex Instances Attributes
- Parameters
attributes_for_vertex_instances (Array(AttributesForVertexInstance)) –
- set_vertices_attributes(attributes_for_vertices) → None¶
Set Vertices Attributes
- Parameters
attributes_for_vertices (Array(AttributesForVertex)) –
- set_vertices_corner_sharpness(vertex_i_ds, vertices_new_corner_sharpness) → None¶
Set Vertices Corner Sharpness
- split_edge(edge_id, splits)¶
Split Edge
- split_polygonal_mesh(plane) -> (polygon_i_ds1=Array(PolygonID), polygon_i_ds2=Array(PolygonID), boundary_i_ds=Array(EdgeID))¶
Split Polygonal Mesh
- Parameters
plane (Plane) –
- Returns
polygon_i_ds1 (Array(PolygonID)):
polygon_i_ds2 (Array(PolygonID)):
boundary_i_ds (Array(EdgeID)):
- Return type
tuple
- split_polygons(polygons_to_split)¶
Split Polygons
- Parameters
polygons_to_split (Array(PolygonToSplit)) –
- Returns
out_new_edge_i_ds (Array(EdgeID)):
- Return type
- start_modification(mesh_modification_type, mesh_topology_change) → None¶
Start Modification
- Parameters
mesh_modification_type (MeshModificationType) –
mesh_topology_change (MeshTopologyChange) –
- property subdivision_count¶
[Read-Only] How many levels to subdivide this mesh. Zero will turn off subdivisions
- Type
(int32)
- tessellate_polygons(polygon_i_ds, triangle_tessellation_mode)¶
Tessellate Polygons
- Parameters
triangle_tessellation_mode (TriangleTessellationMode) –
- Returns
out_new_polygon_i_ds (Array(PolygonID)):
- Return type
- property texture_coordinate_count¶
[Read-Only] The number of texture coordinates stored on the vertices of this mesh
- Type
(int32)
- triangulate_polygons(polygon_i_ds)¶
Triangulate Polygons
- try_to_remove_polygon_edge(edge_id) -> (out_was_edge_removed=bool, out_new_polygon_id=PolygonID)¶
Try to Remove Polygon Edge
- Parameters
edge_id (EdgeID) –
- Returns
out_was_edge_removed (bool):
out_new_polygon_id (PolygonID):
- Return type
tuple