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/makesrna/intern/rna_mesh_api.c | 8 ++++---- source/blender/makesrna/intern/rna_particle.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index 3635759ad4d..7551f9d7096 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -102,10 +102,10 @@ static void rna_Mesh_calc_smooth_groups( static void rna_Mesh_normals_split_custom_do(Mesh *mesh, float (*custom_loopnors)[3], - const bool use_vertices) + const bool use_verts) { - if (use_vertices) { - BKE_mesh_set_custom_normals_from_vertices(mesh, custom_loopnors); + if (use_verts) { + BKE_mesh_set_custom_normals_from_verts(mesh, custom_loopnors); } else { BKE_mesh_set_custom_normals(mesh, custom_loopnors); @@ -165,7 +165,7 @@ static void rna_Mesh_transform(Mesh *mesh, float mat[16], bool shape_keys) static void rna_Mesh_flip_normals(Mesh *mesh) { - BKE_mesh_polygons_flip( + BKE_mesh_polys_flip( BKE_mesh_polys(mesh), BKE_mesh_loops_for_write(mesh), &mesh->ldata, mesh->totpoly); BKE_mesh_tessface_clear(mesh); BKE_mesh_normals_tag_dirty(mesh); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index cd2434ff5be..40e7f6e65c2 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -212,10 +212,10 @@ static void rna_ParticleHairKey_location_object_get(PointerRNA *ptr, float *valu if (pa) { Mesh *hair_mesh = (psmd->psys->flag & PSYS_HAIR_DYNAMICS) ? psmd->psys->hair_out_mesh : NULL; - const MVert *vertices = BKE_mesh_verts(hair_mesh); + const MVert *verts = BKE_mesh_verts(hair_mesh); if (hair_mesh) { - const MVert *mvert = &vertices[pa->hair_index + (hkey - pa->hair)]; - copy_v3_v3(values, mvert->co); + const MVert *mv = &verts[pa->hair_index + (hkey - pa->hair)]; + copy_v3_v3(values, mv->co); } else { float hairmat[4][4]; @@ -279,9 +279,9 @@ static void hair_key_location_object_set(HairKey *hair_key, if (hair_key_index == -1) { return; } - MVert *vertices = BKE_mesh_verts_for_write(hair_mesh); - MVert *mvert = &vertices[particle->hair_index + (hair_key_index)]; - copy_v3_v3(mvert->co, src_co); + MVert *verts = BKE_mesh_verts_for_write(hair_mesh); + MVert *mv = &verts[particle->hair_index + (hair_key_index)]; + copy_v3_v3(mv->co, src_co); return; } @@ -324,9 +324,9 @@ static void rna_ParticleHairKey_co_object(HairKey *hairkey, NULL; if (particle) { if (hair_mesh) { - const MVert *vertices = BKE_mesh_verts(hair_mesh); - const MVert *mvert = &vertices[particle->hair_index + (hairkey - particle->hair)]; - copy_v3_v3(n_co, mvert->co); + const MVert *verts = BKE_mesh_verts(hair_mesh); + const MVert *mv = &verts[particle->hair_index + (hairkey - particle->hair)]; + copy_v3_v3(n_co, mv->co); } else { float hairmat[4][4]; -- cgit v1.2.3