From c2c369ebe693456b7048b3908f342f5667e0fd03 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 8 Sep 2022 11:22:30 +1000 Subject: Cleanup: prefer terms verts/polys over vertices/polygons Follows existing naming for the most part, also use "num" as a suffix in some instances (following our naming conventions). --- source/blender/io/alembic/intern/abc_customdata.cc | 6 +++--- source/blender/io/alembic/intern/abc_reader_mesh.cc | 2 +- source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/io') diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc index 64f1087a5de..5494bfaa6e8 100644 --- a/source/blender/io/alembic/intern/abc_customdata.cc +++ b/source/blender/io/alembic/intern/abc_customdata.cc @@ -57,7 +57,7 @@ static void get_uvs(const CDStreamConfig &config, } const int num_poly = config.totpoly; - MPoly *polygons = config.mpoly; + MPoly *mpoly = config.mpoly; MLoop *mloop = config.mloop; if (!config.pack_uvs) { @@ -67,7 +67,7 @@ static void get_uvs(const CDStreamConfig &config, /* Iterate in reverse order to match exported polygons. */ for (int i = 0; i < num_poly; i++) { - MPoly ¤t_poly = polygons[i]; + MPoly ¤t_poly = mpoly[i]; const MLoopUV *loopuv = mloopuv_array + current_poly.loopstart + current_poly.totloop; for (int j = 0; j < current_poly.totloop; j++, count++) { @@ -85,7 +85,7 @@ static void get_uvs(const CDStreamConfig &config, int idx_count = 0; for (int i = 0; i < num_poly; i++) { - MPoly ¤t_poly = polygons[i]; + MPoly ¤t_poly = mpoly[i]; MLoop *looppoly = mloop + current_poly.loopstart + current_poly.totloop; const MLoopUV *loopuv = mloopuv_array + current_poly.loopstart + current_poly.totloop; diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index c80d580eb32..d0c2063b7e6 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -310,7 +310,7 @@ static void process_vertex_normals(CDStreamConfig &config, } config.mesh->flag |= ME_AUTOSMOOTH; - BKE_mesh_set_custom_normals_from_vertices(config.mesh, vnors); + BKE_mesh_set_custom_normals_from_verts(config.mesh, vnors); MEM_freeN(vnors); } diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc index cd724152b05..7f421b010b7 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc @@ -242,8 +242,8 @@ const Material *OBJMesh::get_object_material(const int16_t mat_nr) const bool OBJMesh::is_ith_poly_smooth(const int poly_index) const { - const Span polygons = export_mesh_eval_->polys(); - return polygons[poly_index].flag & ME_SMOOTH; + const Span polys = export_mesh_eval_->polys(); + return polys[poly_index].flag & ME_SMOOTH; } const char *OBJMesh::get_object_name() const @@ -317,7 +317,7 @@ void OBJMesh::store_uv_coords_and_indices() if (uv_vert->separate) { tot_uv_vertices_ += 1; } - const int vertices_in_poly = polys[uv_vert->poly_index].totloop; + const int verts_in_poly = polys[uv_vert->poly_index].totloop; /* Store UV vertex coordinates. */ uv_coords_.resize(tot_uv_vertices_); @@ -326,7 +326,7 @@ void OBJMesh::store_uv_coords_and_indices() uv_coords_[tot_uv_vertices_ - 1] = float2(vert_uv_coords[0], vert_uv_coords[1]); /* Store UV vertex indices. */ - uv_indices_[uv_vert->poly_index].resize(vertices_in_poly); + uv_indices_[uv_vert->poly_index].resize(verts_in_poly); /* Keep indices zero-based and let the writer handle the "+ 1" as per OBJ spec. */ uv_indices_[uv_vert->poly_index][uv_vert->loop_of_poly_index] = tot_uv_vertices_ - 1; } -- cgit v1.2.3