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/blenkernel/intern/mesh_normals.cc | |
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/blenkernel/intern/mesh_normals.cc')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_normals.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc index 7217cbf5880..706026f072b 100644 --- a/source/blender/blenkernel/intern/mesh_normals.cc +++ b/source/blender/blenkernel/intern/mesh_normals.cc @@ -369,8 +369,8 @@ const float (*BKE_mesh_vertex_normals_ensure(const Mesh *mesh))[3] /* Isolate task because a mutex is locked and computing normals is multi-threaded. */ blender::threading::isolate_task([&]() { Mesh &mesh_mutable = *const_cast<Mesh *>(mesh); - const Span<MVert> verts = mesh_mutable.vertices(); - const Span<MPoly> polys = mesh_mutable.polygons(); + const Span<MVert> verts = mesh_mutable.verts(); + const Span<MPoly> polys = mesh_mutable.polys(); const Span<MLoop> loops = mesh_mutable.loops(); vert_normals = BKE_mesh_vertex_normals_for_write(&mesh_mutable); @@ -417,8 +417,8 @@ const float (*BKE_mesh_poly_normals_ensure(const Mesh *mesh))[3] /* Isolate task because a mutex is locked and computing normals is multi-threaded. */ blender::threading::isolate_task([&]() { Mesh &mesh_mutable = *const_cast<Mesh *>(mesh); - const Span<MVert> verts = mesh_mutable.vertices(); - const Span<MPoly> polys = mesh_mutable.polygons(); + const Span<MVert> verts = mesh_mutable.verts(); + const Span<MPoly> polys = mesh_mutable.polys(); const Span<MLoop> loops = mesh_mutable.loops(); poly_normals = BKE_mesh_poly_normals_for_write(&mesh_mutable); @@ -2063,9 +2063,9 @@ static void mesh_set_custom_normals(Mesh *mesh, float (*r_custom_nors)[3], const clnors = (short(*)[2])CustomData_add_layer( &mesh->ldata, CD_CUSTOMLOOPNORMAL, CD_SET_DEFAULT, nullptr, numloops); } - const Span<MVert> verts = mesh->vertices(); + const Span<MVert> verts = mesh->verts(); MutableSpan<MEdge> edges = mesh->edges_for_write(); - const Span<MPoly> polys = mesh->polygons(); + const Span<MPoly> polys = mesh->polys(); const Span<MLoop> loops = mesh->loops(); mesh_normals_loop_custom_set(verts.data(), |