Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-27 08:06:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-27 08:07:51 +0300
commit13f54f65c43dd20f9566ec6a977a02eea9d68f85 (patch)
treebc94c003c3ef24d67311b23c28f08c02e3a6f09d /source
parent2b618b0f2dad08cce7d4d915667e0b0eb0f62ca0 (diff)
Cleanup: struct member name wasn't descriptive
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/mesh/editmesh_select.c14
1 files changed, 9 insertions, 5 deletions
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(