[Bf-blender-cvs] [c2c369ebe69] master: Cleanup: prefer terms verts/polys over vertices/polygons
Campbell Barton
noreply at git.blender.org
Thu Sep 8 04:15:24 CEST 2022
Commit: c2c369ebe693456b7048b3908f342f5667e0fd03
Author: Campbell Barton
Date: Thu Sep 8 11:22:30 2022 +1000
Branches: master
https://developer.blender.org/rBc2c369ebe693456b7048b3908f342f5667e0fd03
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).
===================================================================
M source/blender/blenkernel/BKE_mesh.h
M source/blender/blenkernel/BKE_mesh_fair.h
M source/blender/blenkernel/BKE_paint.h
M source/blender/blenkernel/BKE_pbvh.h
M source/blender/blenkernel/intern/mesh_boolean_convert.cc
M source/blender/blenkernel/intern/mesh_evaluate.cc
M source/blender/blenkernel/intern/mesh_fair.cc
M source/blender/blenkernel/intern/mesh_merge.c
M source/blender/blenkernel/intern/mesh_normals.cc
M source/blender/blenkernel/intern/multires_reshape_smooth.c
M source/blender/blenkernel/intern/multires_unsubdivide.c
M source/blender/blenkernel/intern/paint.cc
M source/blender/blenkernel/intern/particle.c
M source/blender/blenkernel/intern/pbvh.c
M source/blender/blenkernel/intern/softbody.c
M source/blender/blenloader/intern/versioning_250.c
M source/blender/draw/intern/draw_cache_impl_subdivision.cc
M source/blender/editors/mesh/editface.cc
M source/blender/editors/mesh/editmesh_extrude_screw.c
M source/blender/editors/object/object_remesh.cc
M source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
M source/blender/editors/sculpt_paint/sculpt.c
M source/blender/editors/sculpt_paint/sculpt_boundary.c
M source/blender/editors/sculpt_paint/sculpt_expand.c
M source/blender/editors/sculpt_paint/sculpt_face_set.c
M source/blender/editors/sculpt_paint/sculpt_geodesic.c
M source/blender/editors/sculpt_paint/sculpt_intern.h
M source/blender/editors/sculpt_paint/sculpt_ops.c
M source/blender/editors/sculpt_paint/sculpt_undo.c
M source/blender/editors/space_info/info_stats.cc
M source/blender/editors/space_view3d/view3d_select.cc
M source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
M source/blender/geometry/intern/mesh_primitive_cuboid.cc
M source/blender/geometry/intern/mesh_to_volume.cc
M source/blender/io/alembic/intern/abc_customdata.cc
M source/blender/io/alembic/intern/abc_reader_mesh.cc
M source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
M source/blender/makesrna/intern/rna_mesh_api.c
M source/blender/makesrna/intern/rna_particle.c
M source/blender/modifiers/intern/MOD_array.c
M source/blender/modifiers/intern/MOD_mask.cc
M source/blender/modifiers/intern/MOD_meshsequencecache.cc
M source/blender/modifiers/intern/MOD_ocean.c
M source/blender/modifiers/intern/MOD_weighted_normal.c
M source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
M source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc
M source/blender/nodes/geometry/nodes/node_geo_edge_paths_to_selection.cc
M source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc
M source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
M source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc
===================================================================
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index a5b0e21f0ca..1048ca39958 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -665,18 +665,18 @@ void BKE_mesh_normals_loop_custom_set(const struct MVert *mverts,
const float (*polynors)[3],
int numPolys,
short (*r_clnors_data)[2]);
-void BKE_mesh_normals_loop_custom_from_vertices_set(const struct MVert *mverts,
- const float (*vert_normals)[3],
- float (*r_custom_vertnors)[3],
- int numVerts,
- struct MEdge *medges,
- int numEdges,
- const struct MLoop *mloops,
- int numLoops,
- const struct MPoly *mpolys,
- const float (*polynors)[3],
- int numPolys,
- short (*r_clnors_data)[2]);
+void BKE_mesh_normals_loop_custom_from_verts_set(const struct MVert *mverts,
+ const float (*vert_normals)[3],
+ float (*r_custom_vertnors)[3],
+ int numVerts,
+ struct MEdge *medges,
+ int numEdges,
+ const struct MLoop *mloops,
+ int numLoops,
+ const struct MPoly *mpolys,
+ const float (*polynors)[3],
+ int numPolys,
+ short (*r_clnors_data)[2]);
/**
* Computes average per-vertex normals from given custom loop normals.
@@ -717,12 +717,12 @@ void BKE_mesh_calc_normals_split_ex(struct Mesh *mesh,
void BKE_mesh_set_custom_normals(struct Mesh *mesh, float (*r_custom_loopnors)[3]);
/**
* Higher level functions hiding most of the code needed around call to
- * #BKE_mesh_normals_loop_custom_from_vertices_set().
+ * #BKE_mesh_normals_loop_custom_from_verts_set().
*
* \param r_custom_vertnors: is not const, since code will replace zero_v3 normals there
* with automatically computed vectors.
*/
-void BKE_mesh_set_custom_normals_from_vertices(struct Mesh *mesh, float (*r_custom_vertnors)[3]);
+void BKE_mesh_set_custom_normals_from_verts(struct Mesh *mesh, float (*r_custom_vertnors)[3]);
/* *** mesh_evaluate.cc *** */
@@ -812,10 +812,10 @@ void BKE_mesh_polygon_flip(const struct MPoly *mpoly,
*
* \note Invalidates tessellation, caller must handle that.
*/
-void BKE_mesh_polygons_flip(const struct MPoly *mpoly,
- struct MLoop *mloop,
- struct CustomData *ldata,
- int totpoly);
+void BKE_mesh_polys_flip(const struct MPoly *mpoly,
+ struct MLoop *mloop,
+ struct CustomData *ldata,
+ int totpoly);
/* Merge verts. */
/* Enum for merge_mode of #BKE_mesh_merge_verts.
diff --git a/source/blender/blenkernel/BKE_mesh_fair.h b/source/blender/blenkernel/BKE_mesh_fair.h
index 0dc44ecb247..9d94c692858 100644
--- a/source/blender/blenkernel/BKE_mesh_fair.h
+++ b/source/blender/blenkernel/BKE_mesh_fair.h
@@ -25,16 +25,16 @@ typedef enum eMeshFairingDepth {
/* affect_vertices is used to define the fairing area. Indexed by vertex index, set to true when
* the vertex should be modified by fairing. */
-void BKE_bmesh_prefair_and_fair_vertices(struct BMesh *bm,
- bool *affect_vertices,
- eMeshFairingDepth depth);
+void BKE_bmesh_prefair_and_fair_verts(struct BMesh *bm,
+ bool *affect_verts,
+ eMeshFairingDepth depth);
/* This function can optionally use the MVert coordinates of deform_mverts to read and write the
* fairing result. When NULL, the function will use mesh->mverts directly. */
-void BKE_mesh_prefair_and_fair_vertices(struct Mesh *mesh,
- struct MVert *deform_mverts,
- bool *affect_vertices,
- eMeshFairingDepth depth);
+void BKE_mesh_prefair_and_fair_verts(struct Mesh *mesh,
+ struct MVert *deform_mverts,
+ bool *affect_verts,
+ eMeshFairingDepth depth);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 2197fa3af1e..9a067e761d7 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -402,7 +402,7 @@ typedef struct SculptBoundaryEditInfo {
int original_vertex_i;
/* How many steps were needed to reach this vertex from the boundary. */
- int num_propagation_steps;
+ int propagation_steps_num;
/* Strength that is used to deform this vertex. */
float strength_factor;
@@ -416,10 +416,10 @@ typedef struct SculptBoundaryPreviewEdge {
typedef struct SculptBoundary {
/* Vertex indices of the active boundary. */
- PBVHVertRef *vertices;
- int *vertices_i;
- int vertices_capacity;
- int num_vertices;
+ PBVHVertRef *verts;
+ int *verts_i;
+ int verts_capacity;
+ int verts_num;
/* Distance from a vertex in the boundary to initial vertex indexed by vertex index, taking into
* account the length of all edges between them. Any vertex that is not in the boundary will have
@@ -429,7 +429,7 @@ typedef struct SculptBoundary {
/* Data for drawing the preview. */
SculptBoundaryPreviewEdge *edges;
int edges_capacity;
- int num_edges;
+ int edges_num;
/* True if the boundary loops into itself. */
bool forms_loop;
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 8c9488b0b46..716ee7d2a21 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -389,7 +389,7 @@ const struct CCGKey *BKE_pbvh_get_grid_key(const PBVH *pbvh);
struct CCGElem **BKE_pbvh_get_grids(const PBVH *pbvh);
BLI_bitmap **BKE_pbvh_get_grid_visibility(const PBVH *pbvh);
-int BKE_pbvh_get_grid_num_vertices(const PBVH *pbvh);
+int BKE_pbvh_get_grid_num_verts(const PBVH *pbvh);
int BKE_pbvh_get_grid_num_faces(const PBVH *pbvh);
/**
diff --git a/source/blender/blenkernel/intern/mesh_boolean_convert.cc b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
index e37de1ae513..4201b03c1f7 100644
--- a/source/blender/blenkernel/intern/mesh_boolean_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
@@ -609,7 +609,7 @@ static void copy_or_interp_loop_attributes(Mesh *dest_mesh,
get_poly2d_cos(orig_me, orig_mp, cos_2d, mim.to_target_transform[orig_me_index], axis_mat);
}
CustomData *target_cd = &dest_mesh->ldata;
- const Span<MVert> dst_vertices = dest_mesh->verts();
+ const Span<MVert> dst_verts = dest_mesh->verts();
const Span<MLoop> dst_loops = dest_mesh->loops();
for (int i = 0; i < mp->totloop; ++i) {
int loop_index = mp->loopstart + i;
@@ -620,7 +620,7 @@ static void copy_or_interp_loop_attributes(Mesh *dest_mesh,
* The coordinate needs to be projected into 2d, just like the interpolating polygon's
* coordinates were. The `dest_mesh` coordinates are already in object 0 local space. */
float co[2];
- mul_v2_m3v3(co, axis_mat, dst_vertices[dst_loops[loop_index].v].co);
+ mul_v2_m3v3(co, axis_mat, dst_verts[dst_loops[loop_index].v].co);
interp_weights_poly_v2(weights.data(), cos_2d, orig_mp->totloop, co);
}
for (int source_layer_i = 0; source_layer_i < source_cd->totlayer; ++source_layer_i) {
@@ -723,10 +723,10 @@ static Mesh *imesh_to_mesh(IMesh *im, MeshesToIMeshInfo &mim)
merge_vertex_loop_poly_customdata_layers(result, mim);
/* Set the vertex coordinate values and other data. */
- MutableSpan<MVert> vertices = result->verts_for_write();
+ MutableSpan<MVert> verts = result->verts_for_write();
for (int vi : im->vert_index_range()) {
const Vert *v = im->vert(vi);
- MVert *mv = &vertices[vi];
+ MVert *mv = &verts[vi];
copy_v3fl_v3db(mv->co, v->co);
if (v->orig != NO_INDEX) {
const Mesh *orig_me;
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.cc b/source/blender/blenkernel/intern/mesh_evaluate.cc
index f2fe2e0b141..b1a70d5450c 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.cc
+++ b/source/blender/blenkernel/intern/mesh_evaluate.cc
@@ -717,7 +717,7 @@ void BKE_mesh_polygon_flip(const MPoly *mpoly, MLoop *mloop, CustomData *ldata)
BKE_mesh_polygon_flip_ex(mpoly, mloop, ldata, nullptr, mdisp, true);
}
-void BKE_mesh_polygons_flip(const MPoly *mpoly, MLoop *mloop, CustomData *ldata, int totpoly)
+void BKE_mesh_polys_flip(const MPoly *mpoly, MLoop *mloop, CustomData *ldata, int totpoly)
{
MDisps *mdisp = (MDisps *)CustomData_get_layer(ldata, CD_MDISPS);
const MPoly *mp;
diff --git a/source/blender/blenkernel/intern/mesh_fair.cc b/source/blender/blenkernel/intern/mesh_fair.cc
index fe5add864ea..41dcb3501cc 100644
--- a/source/blender/blenkernel/intern/mesh_fair.cc
+++ b/source/blender/blenkernel/intern/mesh_fair.cc
@@ -76,13 +76,13 @@ class FairingContext {
virtual ~FairingContext() = default;
- void fair_vertices(bool *affected,
- const eMeshFairingDepth depth,
- VertexWeight *vertex_weight,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list