[Bf-blender-cvs] [13f54f65c43] master: Cleanup: struct member name wasn't descriptive

Campbell Barton noreply at git.blender.org
Tue Aug 27 07:08:32 CEST 2019


Commit: 13f54f65c43dd20f9566ec6a977a02eea9d68f85
Author: Campbell Barton
Date:   Tue Aug 27 15:06:53 2019 +1000
Branches: master
https://developer.blender.org/rB13f54f65c43dd20f9566ec6a977a02eea9d68f85

Cleanup: struct member name wasn't descriptive

===================================================================

M	source/blender/editors/mesh/editmesh_select.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 34383f2ab83..6eb7dedf772 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -204,8 +204,12 @@ struct EDBMSplitEdge {
 struct EDBMSplitBestFaceData {
   BMEdge **edgenet;
   int edgenet_len;
-  float average;
 
+  /**
+   * Track the range of vertices on the faces normal,
+   * find the lowest since it's most likely to be most co-planar with the face.
+   */
+  float best_face_range_on_normal_axis;
   BMFace *r_best_face;
 };
 
@@ -245,9 +249,9 @@ static bool edbm_vert_pair_share_best_splittable_face_cb(BMFace *f,
     verts[1] = (*e_iter)->v2;
   }
 
-  float average = max - min;
-  if (average < data->average) {
-    data->average = average;
+  const float test_face_range_on_normal_axis = max - min;
+  if (test_face_range_on_normal_axis < data->best_face_range_on_normal_axis) {
+    data->best_face_range_on_normal_axis = test_face_range_on_normal_axis;
     data->r_best_face = f;
   }
 
@@ -321,7 +325,7 @@ static void edbm_automerge_weld_linked_wire_edges_into_linked_faces(BMesh *bm,
       struct EDBMSplitBestFaceData data = {
           .edgenet = edgenet,
           .edgenet_len = edgenet_len,
-          .average = FLT_MAX,
+          .best_face_range_on_normal_axis = FLT_MAX,
           .r_best_face = NULL,
       };
       BM_vert_pair_shared_face_cb(



More information about the Bf-blender-cvs mailing list