diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-07 08:06:31 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-07 08:06:31 +0300 |
commit | be038b844cb53bc228d3e98bfe09071560930cde (patch) | |
tree | 13de4a3fc3b49a8b2075a0413dc8261603fbc718 /source/blender/nodes/geometry | |
parent | 20daaeffce4cf9bfe48ab7c84cb9e2b1d71d2c91 (diff) |
Cleanup: Tweak naming for recently added mesh accessors
Use `verts` instead of `vertices` and `polys` instead of `polygons`
in the API added in 05952aa94d33eeb50. This aligns better with
existing naming where the shorter names are much more common.
Diffstat (limited to 'source/blender/nodes/geometry')
25 files changed, 84 insertions, 84 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc b/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc index d03f036eaa4..c8b692651e9 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc @@ -46,7 +46,7 @@ static Mesh *hull_from_bullet(const Mesh *mesh, Span<float3> coords) } /* Copy vertices. */ - MutableSpan<MVert> dst_verts = result->vertices_for_write(); + MutableSpan<MVert> dst_verts = result->verts_for_write(); for (const int i : IndexRange(verts_num)) { float co[3]; int original_index; @@ -109,7 +109,7 @@ static Mesh *hull_from_bullet(const Mesh *mesh, Span<float3> coords) /* Copy faces. */ Array<int> loops; int j = 0; - MutableSpan<MPoly> polys = result->polygons_for_write(); + MutableSpan<MPoly> polys = result->polys_for_write(); MutableSpan<MLoop> mesh_loops = result->loops_for_write(); MLoop *loop = mesh_loops.data(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc index 580886ad6be..c675ee472cd 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc @@ -79,9 +79,9 @@ static Mesh *cdt_to_mesh(const meshintersect::CDT_result<double> &result) } Mesh *mesh = BKE_mesh_new_nomain(vert_len, edge_len, 0, loop_len, poly_len); - MutableSpan<MVert> verts = mesh->vertices_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); MutableSpan<MEdge> edges = mesh->edges_for_write(); - MutableSpan<MPoly> polys = mesh->polygons_for_write(); + MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); for (const int i : IndexRange(result.vert.size())) { diff --git a/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc index 07b419cc05c..e8dbfbde401 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_deform_curves_on_surface.cc @@ -66,10 +66,10 @@ static void deform_curves(const CurvesGeometry &curves, const float4x4 curves_to_surface = surface_to_curves.inverted(); - const Span<MVert> surface_verts_old = surface_mesh_old.vertices(); + const Span<MVert> surface_verts_old = surface_mesh_old.verts(); const Span<MLoop> surface_loops_old = surface_mesh_old.loops(); - const Span<MVert> surface_verts_new = surface_mesh_new.vertices(); + const Span<MVert> surface_verts_new = surface_mesh_new.verts(); const Span<MLoop> surface_loops_new = surface_mesh_new.loops(); threading::parallel_for(curves.curves_range(), 256, [&](const IndexRange range) { diff --git a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc index a4096efb79f..1c8a34dab1f 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc @@ -161,7 +161,7 @@ static void copy_face_corner_attributes(const Map<AttributeIDRef, AttributeKind> const Span<int> selected_poly_indices, const Mesh &mesh_in) { - const Span<MPoly> polys = mesh_in.polygons(); + const Span<MPoly> polys = mesh_in.polys(); Vector<int64_t> indices; indices.reserve(selected_loops_num); for (const int src_poly_index : selected_poly_indices) { @@ -181,8 +181,8 @@ static void copy_masked_vertices_to_new_mesh(const Mesh &src_mesh, Span<int> vertex_map) { BLI_assert(src_mesh.totvert == vertex_map.size()); - const Span<MVert> src_verts = src_mesh.vertices(); - MutableSpan<MVert> dst_verts = dst_mesh.vertices_for_write(); + const Span<MVert> src_verts = src_mesh.verts(); + MutableSpan<MVert> dst_verts = dst_mesh.verts_for_write(); for (const int i_src : vertex_map.index_range()) { const int i_dst = vertex_map[i_src]; @@ -239,9 +239,9 @@ static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh, Span<int> masked_poly_indices, Span<int> new_loop_starts) { - const Span<MPoly> src_polygons = src_mesh.polygons(); + const Span<MPoly> src_polygons = src_mesh.polys(); const Span<MLoop> src_loops = src_mesh.loops(); - MutableSpan<MPoly> dst_polygons = dst_mesh.polygons_for_write(); + MutableSpan<MPoly> dst_polygons = dst_mesh.polys_for_write(); MutableSpan<MLoop> dst_loops = dst_mesh.loops_for_write(); for (const int i_dst : masked_poly_indices.index_range()) { @@ -270,9 +270,9 @@ static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh, Span<int> masked_poly_indices, Span<int> new_loop_starts) { - const Span<MPoly> src_polygons = src_mesh.polygons(); + const Span<MPoly> src_polygons = src_mesh.polys(); const Span<MLoop> src_loops = src_mesh.loops(); - MutableSpan<MPoly> dst_polygons = dst_mesh.polygons_for_write(); + MutableSpan<MPoly> dst_polygons = dst_mesh.polys_for_write(); MutableSpan<MLoop> dst_loops = dst_mesh.loops_for_write(); for (const int i_dst : masked_poly_indices.index_range()) { @@ -302,9 +302,9 @@ static void copy_masked_polys_to_new_mesh(const Mesh &src_mesh, Span<int> masked_poly_indices, Span<int> new_loop_starts) { - const Span<MPoly> src_polygons = src_mesh.polygons(); + const Span<MPoly> src_polygons = src_mesh.polys(); const Span<MLoop> src_loops = src_mesh.loops(); - MutableSpan<MPoly> dst_polygons = dst_mesh.polygons_for_write(); + MutableSpan<MPoly> dst_polygons = dst_mesh.polys_for_write(); MutableSpan<MLoop> dst_loops = dst_mesh.loops_for_write(); for (const int i_dst : masked_poly_indices.index_range()) { @@ -460,7 +460,7 @@ static void compute_selected_polygons_from_vertex_selection(const Mesh &mesh, int *r_selected_loops_num) { BLI_assert(mesh.totvert == vertex_selection.size()); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); r_selected_poly_indices.reserve(mesh.totpoly); @@ -565,7 +565,7 @@ static void compute_selected_polygons_from_edge_selection(const Mesh &mesh, int *r_selected_polys_num, int *r_selected_loops_num) { - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); r_selected_poly_indices.reserve(mesh.totpoly); @@ -714,7 +714,7 @@ static void compute_selected_polygons_from_poly_selection(const Mesh &mesh, int *r_selected_loops_num) { BLI_assert(mesh.totpoly == poly_selection.size()); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); r_selected_poly_indices.reserve(mesh.totpoly); r_loop_starts.reserve(mesh.totloop); @@ -748,7 +748,7 @@ static void compute_selected_mesh_data_from_poly_selection_edge_face( { BLI_assert(mesh.totpoly == poly_selection.size()); BLI_assert(mesh.totedge == r_edge_map.size()); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); r_edge_map.fill(-1); @@ -799,7 +799,7 @@ static void compute_selected_mesh_data_from_poly_selection(const Mesh &mesh, { BLI_assert(mesh.totpoly == poly_selection.size()); BLI_assert(mesh.totedge == r_edge_map.size()); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); r_vertex_map.fill(-1); @@ -996,7 +996,7 @@ static void do_mesh_separation(GeometrySet &geometry_set, selected_polys_num); /* Copy the selected parts of the mesh over to the new mesh. */ - mesh_out->vertices_for_write().copy_from(mesh_in.vertices()); + mesh_out->verts_for_write().copy_from(mesh_in.verts()); copy_masked_edges_to_new_mesh(mesh_in, *mesh_out, edge_map); copy_masked_polys_to_new_mesh( mesh_in, *mesh_out, edge_map, selected_poly_indices, new_loop_starts); @@ -1059,7 +1059,7 @@ static void do_mesh_separation(GeometrySet &geometry_set, &mesh_in, mesh_in.totvert, mesh_in.totedge, 0, selected_loops_num, selected_polys_num); /* Copy the selected parts of the mesh over to the new mesh. */ - mesh_out->vertices_for_write().copy_from(mesh_in.vertices()); + mesh_out->verts_for_write().copy_from(mesh_in.verts()); mesh_out->edges_for_write().copy_from(mesh_in.edges()); copy_masked_polys_to_new_mesh(mesh_in, *mesh_out, selected_poly_indices, new_loop_starts); diff --git a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc index 2bb321a349a..aaab259fc51 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc @@ -105,7 +105,7 @@ static void sample_mesh_surface(const Mesh &mesh, Vector<float3> &r_bary_coords, Vector<int> &r_looptri_indices) { - const Span<MVert> verts = mesh.vertices(); + const Span<MVert> verts = mesh.verts(); const Span<MLoop> loops = mesh.loops(); const Span<MLoopTri> looptris{BKE_mesh_runtime_looptri_ensure(&mesh), BKE_mesh_runtime_looptri_len(&mesh)}; @@ -350,7 +350,7 @@ BLI_NOINLINE static void compute_attribute_outputs(const Mesh &mesh, attribute_outputs.rotation_id.get(), ATTR_DOMAIN_POINT); } - const Span<MVert> verts = mesh.vertices(); + const Span<MVert> verts = mesh.verts(); const Span<MLoop> loops = mesh.loops(); const Span<MLoopTri> looptris{BKE_mesh_runtime_looptri_ensure(&mesh), BKE_mesh_runtime_looptri_len(&mesh)}; diff --git a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc index 1b9e9ae9b4a..7d81ee91a1c 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc @@ -210,7 +210,7 @@ static void calc_boundaries(const Mesh &mesh, BLI_assert(r_vertex_types.size() == mesh.totvert); BLI_assert(r_edge_types.size() == mesh.totedge); const Span<MEdge> edges = mesh.edges(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); r_vertex_types.fill(VertexType::Loose); @@ -263,7 +263,7 @@ static void calc_boundaries(const Mesh &mesh, static void create_vertex_poly_map(const Mesh &mesh, MutableSpan<Vector<int>> r_vertex_poly_indices) { - const Span<MPoly> polygons = mesh.polygons(); + const Span<MPoly> polygons = mesh.polys(); const Span<MLoop> loops = mesh.loops(); for (const int i : polygons.index_range()) { const MPoly &poly = polygons[i]; @@ -635,9 +635,9 @@ static void calc_dual_mesh(GeometrySet &geometry_set, const bool keep_boundaries) { const Mesh &mesh_in = *in_component.get_for_read(); - const Span<MVert> src_verts = mesh_in.vertices(); + const Span<MVert> src_verts = mesh_in.verts(); const Span<MEdge> src_edges = mesh_in.edges(); - const Span<MPoly> src_polys = mesh_in.polygons(); + const Span<MPoly> src_polys = mesh_in.polys(); const Span<MLoop> src_loops = mesh_in.loops(); Map<AttributeIDRef, AttributeKind> attributes; @@ -921,9 +921,9 @@ static void calc_dual_mesh(GeometrySet &geometry_set, bke::mesh_attributes(mesh_in), bke::mesh_attributes_for_write(*mesh_out)); - MutableSpan<MVert> dst_verts = mesh_out->vertices_for_write(); + MutableSpan<MVert> dst_verts = mesh_out->verts_for_write(); MutableSpan<MEdge> dst_edges = mesh_out->edges_for_write(); - MutableSpan<MPoly> dst_polys = mesh_out->polygons_for_write(); + MutableSpan<MPoly> dst_polys = mesh_out->polys_for_write(); MutableSpan<MLoop> dst_loops = mesh_out->loops_for_write(); int loop_start = 0; diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc index 9af1536a194..f0018e91478 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc @@ -486,7 +486,7 @@ static void copy_stable_id_faces(const Mesh &mesh, VArraySpan<int> src{src_attribute.varray.typed<int>()}; MutableSpan<int> dst = dst_attribute.span.typed<int>(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); int loop_index = 0; for (const int i_poly : selection.index_range()) { const IndexRange range = range_for_offsets_index(poly_offsets, i_poly); @@ -522,9 +522,9 @@ static void duplicate_faces(GeometrySet &geometry_set, geometry_set.keep_only_during_modify({GEO_COMPONENT_TYPE_MESH}); const Mesh &mesh = *geometry_set.get_mesh_for_read(); - const Span<MVert> verts = mesh.vertices(); + const Span<MVert> verts = mesh.verts(); const Span<MEdge> edges = mesh.edges(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); bke::MeshFieldContext field_context{mesh, ATTR_DOMAIN_FACE}; @@ -547,9 +547,9 @@ static void duplicate_faces(GeometrySet &geometry_set, offsets[selection.size()] = total_polys; Mesh *new_mesh = BKE_mesh_new_nomain(total_loops, total_loops, 0, total_loops, total_polys); - MutableSpan<MVert> new_verts = new_mesh->vertices_for_write(); + MutableSpan<MVert> new_verts = new_mesh->verts_for_write(); MutableSpan<MEdge> new_edges = new_mesh->edges_for_write(); - MutableSpan<MPoly> new_polys = new_mesh->polygons_for_write(); + MutableSpan<MPoly> new_polys = new_mesh->polys_for_write(); MutableSpan<MLoop> new_loops = new_mesh->loops_for_write(); Array<int> vert_mapping(new_verts.size()); @@ -904,7 +904,7 @@ static void duplicate_points_mesh(GeometrySet &geometry_set, const IndexAttributes &attribute_outputs) { const Mesh &mesh = *geometry_set.get_mesh_for_read(); - const Span<MVert> src_verts = mesh.vertices(); + const Span<MVert> src_verts = mesh.verts(); bke::MeshFieldContext field_context{mesh, ATTR_DOMAIN_POINT}; FieldEvaluator evaluator{field_context, src_verts.size()}; @@ -917,7 +917,7 @@ static void duplicate_points_mesh(GeometrySet &geometry_set, Array<int> offsets = accumulate_counts_to_offsets(selection, counts); Mesh *new_mesh = BKE_mesh_new_nomain(offsets.last(), 0, 0, 0, 0); - MutableSpan<MVert> dst_verts = new_mesh->vertices_for_write(); + MutableSpan<MVert> dst_verts = new_mesh->verts_for_write(); threaded_slice_fill(offsets.as_span(), selection, src_verts, dst_verts); diff --git a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc index d81b335ebb3..d335a162776 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc @@ -245,7 +245,7 @@ static void extrude_mesh_vertices(Mesh &mesh, const IndexRange new_vert_range{orig_vert_size, selection.size()}; const IndexRange new_edge_range{orig_edge_size, selection.size()}; - MutableSpan<MVert> new_verts = mesh.vertices_for_write().slice(new_vert_range); + MutableSpan<MVert> new_verts = mesh.verts_for_write().slice(new_vert_range); MutableSpan<MEdge> new_edges = mesh.edges_for_write().slice(new_edge_range); for (const int i_selection : selection.index_range()) { @@ -311,7 +311,7 @@ static void extrude_mesh_vertices(Mesh &mesh, static Array<Vector<int, 2>> mesh_calculate_polys_of_edge(const Mesh &mesh) { - Span<MPoly> polys = mesh.polygons(); + Span<MPoly> polys = mesh.polys(); Span<MLoop> loops = mesh.loops(); Array<Vector<int, 2>> polys_of_edge(mesh.totedge); @@ -389,7 +389,7 @@ static void extrude_mesh_edges(Mesh &mesh, { const int orig_vert_size = mesh.totvert; Span<MEdge> orig_edges = mesh.edges(); - Span<MPoly> orig_polys = mesh.polygons(); + Span<MPoly> orig_polys = mesh.polys(); const int orig_loop_size = mesh.totloop; bke::MeshFieldContext edge_context{mesh, ATTR_DOMAIN_EDGE}; @@ -441,7 +441,7 @@ static void extrude_mesh_edges(Mesh &mesh, MutableSpan<MEdge> edges = mesh.edges_for_write(); MutableSpan<MEdge> connect_edges = edges.slice(connect_edge_range); MutableSpan<MEdge> duplicate_edges = edges.slice(duplicate_edge_range); - MutableSpan<MPoly> polys = mesh.polygons_for_write(); + MutableSpan<MPoly> polys = mesh.polys_for_write(); MutableSpan<MPoly> new_polys = polys.slice(new_poly_range); MutableSpan<MLoop> loops = mesh.loops_for_write(); MutableSpan<MLoop> new_loops = loops.slice(new_loop_range); @@ -606,7 +606,7 @@ static void extrude_mesh_edges(Mesh &mesh, return true; }); - MutableSpan<MVert> new_verts = mesh.vertices_for_write().slice(new_vert_range); + MutableSpan<MVert> new_verts = mesh.verts_for_write().slice(new_vert_range); if (edge_offsets.is_single()) { const float3 offset = edge_offsets.get_internal_single(); threading::parallel_for(new_verts.index_range(), 1024, [&](const IndexRange range) { @@ -653,7 +653,7 @@ static void extrude_mesh_face_regions(Mesh &mesh, { const int orig_vert_size = mesh.totvert; Span<MEdge> orig_edges = mesh.edges(); - Span<MPoly> orig_polys = mesh.polygons(); + Span<MPoly> orig_polys = mesh.polys(); Span<MLoop> orig_loops = mesh.loops(); bke::MeshFieldContext poly_context{mesh, ATTR_DOMAIN_FACE}; @@ -785,7 +785,7 @@ static void extrude_mesh_face_regions(Mesh &mesh, MutableSpan<MEdge> connect_edges = edges.slice(connect_edge_range); MutableSpan<MEdge> boundary_edges = edges.slice(boundary_edge_range); MutableSpan<MEdge> new_inner_edges = edges.slice(new_inner_edge_range); - MutableSpan<MPoly> polys = mesh.polygons_for_write(); + MutableSpan<MPoly> polys = mesh.polys_for_write(); MutableSpan<MPoly> new_polys = polys.slice(side_poly_range); MutableSpan<MLoop> loops = mesh.loops_for_write(); MutableSpan<MLoop> new_loops = loops.slice(side_loop_range); @@ -976,7 +976,7 @@ static void extrude_mesh_face_regions(Mesh &mesh, /* Translate vertices based on the offset. If the vertex is used by a selected edge, it will * have been duplicated and only the new vertex should use the offset. Otherwise the vertex might * still need an offset, but it was reused on the inside of a region of extruded faces. */ - MutableSpan<MVert> verts = mesh.vertices_for_write(); + MutableSpan<MVert> verts = mesh.verts_for_write(); if (poly_offsets.is_single()) { const float3 offset = poly_offsets.get_internal_single(); threading::parallel_for( @@ -1038,7 +1038,7 @@ static void extrude_individual_mesh_faces(Mesh &mesh, { const int orig_vert_size = mesh.totvert; const int orig_edge_size = mesh.totedge; - Span<MPoly> orig_polys = mesh.polygons(); + Span<MPoly> orig_polys = mesh.polys(); Span<MLoop> orig_loops = mesh.loops(); /* Use a mesh for the result of the evaluation because the mesh is reallocated before @@ -1078,11 +1078,11 @@ static void extrude_individual_mesh_faces(Mesh &mesh, side_poly_range.size(), side_loop_range.size()); - MutableSpan<MVert> new_verts = mesh.vertices_for_write().slice(new_vert_range); + MutableSpan<MVert> new_verts = mesh.verts_for_write().slice(new_vert_range); MutableSpan<MEdge> edges = mesh.edges_for_write(); MutableSpan<MEdge> connect_edges = edges.slice(connect_edge_range); MutableSpan<MEdge> duplicate_edges = edges.slice(duplicate_edge_range); - MutableSpan<MPoly> polys = mesh.polygons_for_write(); + MutableSpan<MPoly> polys = mesh.polys_for_write(); MutableSpan<MPoly> new_polys = polys.slice(side_poly_range); MutableSpan<MLoop> loops = mesh.loops_for_write(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_flip_faces.cc b/source/blender/nodes/geometry/nodes/node_geo_flip_faces.cc index 2d642ad13d5..fc9c9870c5c 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_flip_faces.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_flip_faces.cc @@ -30,7 +30,7 @@ static void mesh_flip_faces(Mesh &mesh, const Field<bool> &selection_field) evaluator.evaluate(); const IndexMask selection = evaluator.get_evaluated_as_mask(0); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); MutableSpan<MLoop> loops = mesh.loops_for_write(); for (const int i : selection.index_range()) { diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc index 4b5ea1c8742..f2304849cbc 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc @@ -64,8 +64,8 @@ class AngleFieldInput final : public bke::MeshFieldInput { const eAttrDomain domain, IndexMask UNUSED(mask)) const final { - const Span<MVert> verts = mesh.vertices(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MVert> verts = mesh.verts(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); Array<EdgeMapEntry> edge_map = create_edge_map(polys, loops, mesh.totedge); @@ -109,9 +109,9 @@ class SignedAngleFieldInput final : public bke::MeshFieldInput { const eAttrDomain domain, IndexMask UNUSED(mask)) const final { - const Span<MVert> verts = mesh.vertices(); + const Span<MVert> verts = mesh.verts(); const Span<MEdge> edges = mesh.edges(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); Array<EdgeMapEntry> edge_map = create_edge_map(polys, loops, mesh.totedge); diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc index 7fd2df7c552..50ebf78e58f 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc @@ -79,7 +79,7 @@ static VArray<float3> construct_edge_positions_gvarray(const Mesh &mesh, const VertexNumber vertex, const eAttrDomain domain) { - const Span<MVert> verts = mesh.vertices(); + const Span<MVert> verts = mesh.verts(); const Span<MEdge> edges = mesh.edges(); if (vertex == VERTEX_ONE) { diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc index 7dfeaa8e8d9..c4d792c6c9a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc @@ -18,8 +18,8 @@ static void node_declare(NodeDeclarationBuilder &b) static VArray<float> construct_face_area_varray(const Mesh &mesh, const eAttrDomain domain) { - const Span<MVert> verts = mesh.vertices(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MVert> verts = mesh.verts(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); auto area_fn = [verts, polys, loops](const int i) -> float { diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc index b316639fd0a..040b243a868 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc @@ -37,8 +37,8 @@ class PlanarFieldInput final : public bke::MeshFieldInput { const eAttrDomain domain, IndexMask /*mask*/) const final { - const Span<MVert> verts = mesh.vertices(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MVert> verts = mesh.verts(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); const Span<float3> poly_normals{(float3 *)BKE_mesh_poly_normals_ensure(&mesh), mesh.totpoly}; diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc index 59d30b997a6..cd58a0ad428 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc @@ -21,7 +21,7 @@ static void node_declare(NodeDeclarationBuilder &b) static VArray<int> construct_neighbor_count_varray(const Mesh &mesh, const eAttrDomain domain) { - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); Array<int> edge_count(mesh.totedge, 0); @@ -70,7 +70,7 @@ class FaceNeighborCountFieldInput final : public bke::MeshFieldInput { static VArray<int> construct_vertex_count_varray(const Mesh &mesh, const eAttrDomain domain) { - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); return bke::mesh_attributes(mesh).adapt_domain<int>( VArray<int>::ForFunc(polys.size(), [polys](const int i) -> float { return polys[i].totloop; }), diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc index ba3871adc76..801b3c78060 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc @@ -109,9 +109,9 @@ static Mesh *create_circle_mesh(const float radius, circle_corner_total(fill_type, verts_num), circle_face_total(fill_type, verts_num)); BKE_id_material_eval_ensure_default_slot(&mesh->id); - MutableSpan<MVert> verts = mesh->vertices_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); MutableSpan<MEdge> edges = mesh->edges_for_write(); - MutableSpan<MPoly> polys = mesh->polygons_for_write(); + MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); /* Assign vertex coordinates. */ diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc index 98ae1ef1275..93ecc96337e 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc @@ -657,7 +657,7 @@ static Mesh *create_vertex_mesh() { /* Returns a mesh with a single vertex at the origin. */ Mesh *mesh = BKE_mesh_new_nomain(1, 0, 0, 0, 0); - copy_v3_fl3(mesh->vertices_for_write().first().co, 0.0f, 0.0f, 0.0f); + copy_v3_fl3(mesh->verts_for_write().first().co, 0.0f, 0.0f, 0.0f); return mesh; } @@ -689,9 +689,9 @@ Mesh *create_cylinder_or_cone_mesh(const float radius_top, config.tot_verts, config.tot_edges, 0, config.tot_corners, config.tot_faces); BKE_id_material_eval_ensure_default_slot(&mesh->id); - MutableSpan<MVert> verts = mesh->vertices_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); MutableSpan<MEdge> edges = mesh->edges_for_write(); - MutableSpan<MPoly> polys = mesh->polygons_for_write(); + MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); calculate_cone_vertices(verts, config); diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc index 656c5988bef..d8a4db43b27 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_grid.cc @@ -49,9 +49,9 @@ Mesh *create_grid_mesh(const int verts_x, 0, edges_x * edges_y * 4, edges_x * edges_y); - MutableSpan<MVert> verts = mesh->vertices_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); MutableSpan<MEdge> edges = mesh->edges_for_write(); - MutableSpan<MPoly> polys = mesh->polygons_for_write(); + MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); { diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc index 130fb8ae589..b2f629806cd 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc @@ -179,7 +179,7 @@ Mesh *create_line_mesh(const float3 start, const float3 delta, const int count) Mesh *mesh = BKE_mesh_new_nomain(count, count - 1, 0, 0, 0); BKE_id_material_eval_ensure_default_slot(&mesh->id); - MutableSpan<MVert> vertices = mesh->vertices_for_write(); + MutableSpan<MVert> vertices = mesh->verts_for_write(); MutableSpan<MEdge> edges = mesh->edges_for_write(); threading::parallel_invoke( diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc index 48a95bfcb49..017132b1a43 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc @@ -301,9 +301,9 @@ static Mesh *create_uv_sphere_mesh(const float radius, const int segments, const sphere_corner_total(segments, rings), sphere_face_total(segments, rings)); BKE_id_material_eval_ensure_default_slot(&mesh->id); - MutableSpan<MVert> verts = mesh->vertices_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); MutableSpan<MEdge> edges = mesh->edges_for_write(); - MutableSpan<MPoly> polys = mesh->polygons_for_write(); + MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); threading::parallel_invoke( diff --git a/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc index fc467a9424d..8fd05e70ed3 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc @@ -158,9 +158,9 @@ static void scale_vertex_islands_uniformly(Mesh &mesh, const UniformScaleParams ¶ms, const GetVertexIndicesFn get_vertex_indices) { - MutableSpan<MVert> verts = mesh.vertices_for_write(); + MutableSpan<MVert> verts = mesh.verts_for_write(); const Span<MEdge> edges = mesh.edges(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); threading::parallel_for(islands.index_range(), 256, [&](const IndexRange range) { @@ -199,9 +199,9 @@ static void scale_vertex_islands_on_axis(Mesh &mesh, const AxisScaleParams ¶ms, const GetVertexIndicesFn get_vertex_indices) { - MutableSpan<MVert> verts = mesh.vertices_for_write(); + MutableSpan<MVert> verts = mesh.verts_for_write(); const Span<MEdge> edges = mesh.edges(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); threading::parallel_for(islands.index_range(), 256, [&](const IndexRange range) { @@ -245,7 +245,7 @@ static void scale_vertex_islands_on_axis(Mesh &mesh, static Vector<ElementIsland> prepare_face_islands(const Mesh &mesh, const IndexMask face_selection) { - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); /* Use the disjoint set data structure to determine which vertices have to be scaled together. */ diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc index ce453a8ef32..613f140ff0a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc @@ -36,7 +36,7 @@ static void set_computed_position_and_offset(GeometryComponent &component, switch (component.type()) { case GEO_COMPONENT_TYPE_MESH: { Mesh *mesh = static_cast<MeshComponent &>(component).get_for_write(); - MutableSpan<MVert> verts = mesh->vertices_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); if (in_positions.is_same(positions.varray)) { devirtualize_varray(in_offsets, [&](const auto in_offsets) { threading::parallel_for( diff --git a/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc index 6be37a02bd5..13bfe78fbe5 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc @@ -264,8 +264,8 @@ static void get_closest_mesh_corners(const Mesh &mesh, const MutableSpan<float> r_distances_sq, const MutableSpan<float3> r_positions) { - const Span<MVert> verts = mesh.vertices(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MVert> verts = mesh.verts(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); BLI_assert(mesh.totloop > 0); diff --git a/source/blender/nodes/geometry/nodes/node_geo_uv_pack_islands.cc b/source/blender/nodes/geometry/nodes/node_geo_uv_pack_islands.cc index 5900e234220..4953a0aa8d0 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_uv_pack_islands.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_uv_pack_islands.cc @@ -37,8 +37,8 @@ static VArray<float3> construct_uv_gvarray(const Mesh &mesh, const float margin, const eAttrDomain domain) { - const Span<MVert> verts = mesh.vertices(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MVert> verts = mesh.verts(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); bke::MeshFieldContext face_context{mesh, ATTR_DOMAIN_FACE}; diff --git a/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc b/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc index 3095cac6a50..513b9534c55 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_uv_unwrap.cc @@ -62,9 +62,9 @@ static VArray<float3> construct_uv_gvarray(const Mesh &mesh, const GeometryNodeUVUnwrapMethod method, const eAttrDomain domain) { - const Span<MVert> verts = mesh.vertices(); + const Span<MVert> verts = mesh.verts(); const Span<MEdge> edges = mesh.edges(); - const Span<MPoly> polys = mesh.polygons(); + const Span<MPoly> polys = mesh.polys(); const Span<MLoop> loops = mesh.loops(); bke::MeshFieldContext face_context{mesh, ATTR_DOMAIN_FACE}; diff --git a/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc index 5788a744041..46708f53087 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_volume_to_mesh.cc @@ -123,8 +123,8 @@ static Mesh *create_mesh_from_volume_grids(Span<openvdb::GridBase::ConstPtr> gri Mesh *mesh = BKE_mesh_new_nomain(vert_offset, 0, 0, loop_offset, poly_offset); BKE_id_material_eval_ensure_default_slot(&mesh->id); - MutableSpan<MVert> verts = mesh->vertices_for_write(); - MutableSpan<MPoly> polys = mesh->polygons_for_write(); + MutableSpan<MVert> verts = mesh->verts_for_write(); + MutableSpan<MPoly> polys = mesh->polys_for_write(); MutableSpan<MLoop> loops = mesh->loops_for_write(); for (const int i : grids.index_range()) { |