diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-14 03:09:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-14 03:09:42 +0300 |
commit | dd4c87cd0451376bce96c459d90c2b95409f0d11 (patch) | |
tree | 576ee74ff71032c2b6eec94e549a1dba90edec96 /source/blender/editors/mesh | |
parent | aca13040dac986e34468e7d533d0c3cc970fda90 (diff) | |
parent | aa3c4b4cb64f5b14e5167237b1c807b5ecf658bb (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bevel.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_inset.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select_similar.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 14 |
5 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 0202d52a263..4e398c36a2f 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -469,7 +469,7 @@ static int edbm_bevel_invoke(bContext *C, wmOperator *op, const wmEvent *event) opdata = op->customdata; /* initialize mouse values */ - if (!calculateTransformCenter(C, V3D_AROUND_CENTER_MEAN, center_3d, opdata->mcenter)) { + if (!calculateTransformCenter(C, V3D_AROUND_CENTER_MEDIAN, center_3d, opdata->mcenter)) { /* in this case the tool will likely do nothing, * ideally this will never happen and should be checked for above */ opdata->mcenter[0] = opdata->mcenter[1] = 0; diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index 78c0c45576d..9eae3d3b564 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -326,7 +326,7 @@ static int edbm_inset_invoke(bContext *C, wmOperator *op, const wmEvent *event) opdata = op->customdata; /* initialize mouse values */ - if (!calculateTransformCenter(C, V3D_AROUND_CENTER_MEAN, center_3d, opdata->mcenter)) { + if (!calculateTransformCenter(C, V3D_AROUND_CENTER_MEDIAN, center_3d, opdata->mcenter)) { /* in this case the tool will likely do nothing, * ideally this will never happen and should be checked for above */ opdata->mcenter[0] = opdata->mcenter[1] = 0; diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index c24aca83f36..4ab00dd5962 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1262,10 +1262,10 @@ bool EDBM_unified_findnearest_from_raycast( if (BM_elem_flag_test(f, BM_ELEM_HIDDEN) == false) { float point[3]; if (coords) { - BM_face_calc_center_mean_vcos(bm, f, point, coords); + BM_face_calc_center_median_vcos(bm, f, point, coords); } else { - BM_face_calc_center_mean(f, point); + BM_face_calc_center_median(f, point); } mul_m4_v3(obedit->obmat, point); float depth; @@ -1830,7 +1830,7 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de float cent[3]; float co[2], tdist; - BM_face_calc_center_mean(f, cent); + BM_face_calc_center_median(f, cent); if (ED_view3d_project_float_object( vc.ar, cent, co, V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK) { diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c index 304d1b81eab..55e79761681 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.c +++ b/source/blender/editors/mesh/editmesh_select_similar.c @@ -159,7 +159,7 @@ static void face_pos_direction_worldspace_scaled_get(Object *ob, BMFace *face, f copy_v3_v3(r_dir, face->no); normalize_v3(r_dir); - BM_face_calc_center_mean(face, center); + BM_face_calc_center_median(face, center); mul_m4_v3(ob->obmat, center); distance = dot_v3v3(r_dir, center); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 1e0ae61ab01..eff9ded2879 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4647,9 +4647,9 @@ static int edbm_poke_face_exec(bContext *C, wmOperator *op) void MESH_OT_poke(wmOperatorType *ot) { static const EnumPropertyItem poke_center_modes[] = { - {BMOP_POKE_MEAN_WEIGHTED, "MEAN_WEIGHTED", 0, "Weighted Mean", "Weighted Mean Face Center"}, - {BMOP_POKE_MEAN, "MEAN", 0, "Mean", "Mean Face Center"}, - {BMOP_POKE_BOUNDS, "BOUNDS", 0, "Bounds", "Face Bounds Center"}, + {BMOP_POKE_MEDIAN_WEIGHTED, "MEDIAN_WEIGHTED", 0, "Weighted Median", "Weighted median face center"}, + {BMOP_POKE_MEDIAN, "MEDIAN", 0, "Median", "Mean face center"}, + {BMOP_POKE_BOUNDS, "BOUNDS", 0, "Bounds", "Face bounds center"}, {0, NULL, 0, NULL, NULL}}; @@ -4667,7 +4667,7 @@ void MESH_OT_poke(wmOperatorType *ot) RNA_def_float_distance(ot->srna, "offset", 0.0f, -1e3f, 1e3f, "Poke Offset", "Poke Offset", -1.0f, 1.0f); RNA_def_boolean(ot->srna, "use_relative_offset", false, "Offset Relative", "Scale the offset by surrounding geometry"); - RNA_def_enum(ot->srna, "center_mode", poke_center_modes, BMOP_POKE_MEAN_WEIGHTED, + RNA_def_enum(ot->srna, "center_mode", poke_center_modes, BMOP_POKE_MEDIAN_WEIGHTED, "Poke Center", "Poke Face Center Calculation"); } @@ -5710,7 +5710,7 @@ static void sort_bmelem_flag( BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) { if (BM_elem_flag_test(fa, flag)) { float co[3]; - BM_face_calc_center_mean(fa, co); + BM_face_calc_center_median(fa, co); mul_m4_v3(mat, co); pb[i] = false; @@ -5776,7 +5776,7 @@ static void sort_bmelem_flag( BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) { if (BM_elem_flag_test(fa, flag)) { float co[3]; - BM_face_calc_center_mean(fa, co); + BM_face_calc_center_median(fa, co); pb[i] = false; sb[affected[2]].org_idx = i; @@ -7400,7 +7400,7 @@ static int edbm_point_normals_modal(bContext *C, wmOperator *op, const wmEvent * break; } - case V3D_AROUND_CENTER_MEAN: + case V3D_AROUND_CENTER_MEDIAN: { bmesh_selected_verts_center_calc(bm, target); add_v3_v3(target, obedit->loc); |