Cleanup: naming (mean -> median) see T47811
authorCampbell Barton <ideasman42@gmail.com>
Thu, 13 Dec 2018 23:54:11 +0000 (10:54 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 13 Dec 2018 23:54:11 +0000 (10:54 +1100)
24 files changed:
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_interp.c
source/blender/bmesh/intern/bmesh_marking.c
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/intern/bmesh_polygon.h
source/blender/bmesh/intern/bmesh_query.c
source/blender/bmesh/intern/bmesh_query.h
source/blender/bmesh/operators/bmo_normals.c
source/blender/bmesh/operators/bmo_planar_faces.c
source/blender/bmesh/operators/bmo_poke.c
source/blender/bmesh/operators/bmo_similar.c
source/blender/bmesh/tools/bmesh_decimate_collapse.c
source/blender/bmesh/tools/bmesh_intersect.c
source/blender/bmesh/tools/bmesh_path.c
source/blender/bmesh/tools/bmesh_wireframe.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/transform/transform.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/modifiers/intern/MOD_skin.c
source/blender/python/bmesh/bmesh_py_types.c

index c22ede5ebf12025b37e8566e1c1877bd9b536599..b5ff812e7906010365bf01dc8db17e2f73adda76 100644 (file)
@@ -154,12 +154,12 @@ static void emDM_ensurePolyCenters(EditDerivedBMesh *bmdm)
                        BM_mesh_elem_index_ensure(bm, BM_VERT);
 
                        BM_ITER_MESH_INDEX (efa, &fiter, bm, BM_FACES_OF_MESH, i) {
-                               BM_face_calc_center_mean_vcos(bm, efa, polyCos[i], vertexCos);
+                               BM_face_calc_center_median_vcos(bm, efa, polyCos[i], vertexCos);
                        }
                }
                else {
                        BM_ITER_MESH_INDEX (efa, &fiter, bm, BM_FACES_OF_MESH, i) {
-                               BM_face_calc_center_mean(efa, polyCos[i]);
+                               BM_face_calc_center_median(efa, polyCos[i]);
                        }
                }
 
index c384497e0d1c371db86d2cefe3b4f15812b92de2..61cc3fbb6837040c7eb05d23677b156264eb17bb 100644 (file)
@@ -1332,9 +1332,9 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface, const bool do_del)
                float f_center[3];
                float (*faces_center)[3] = BLI_array_alloca(faces_center, totface);
 
-               BM_face_calc_center_mean(f_new, f_center);
+               BM_face_calc_center_median(f_new, f_center);
                for (i = 0; i < totface; i++) {
-                       BM_face_calc_center_mean(faces[i], faces_center[i]);
+                       BM_face_calc_center_median(faces[i], faces_center[i]);
                }
 
                l_iter = l_first = BM_FACE_FIRST_LOOP(f_new);
index e9c92e0d5e401e88f0a310beb7d1264627808d0f..26c62d1086ec3f3d7dbf4a9eddf4fda577f8bd02 100644 (file)
@@ -253,7 +253,7 @@ static int compute_mdisp_quad(
        {
                float cent[3];
                /* computer center */
-               BM_face_calc_center_mean(l->f, cent);
+               BM_face_calc_center_median(l->f, cent);
                BLI_assert(equals_v3v3(cent, l_f_center));
        }
 #endif
@@ -527,8 +527,8 @@ void BM_loop_interp_multires(BMesh *bm, BMLoop *l_dst, const BMFace *f_src)
                float f_dst_center[3];
                float f_src_center[3];
 
-               BM_face_calc_center_mean(l_dst->f, f_dst_center);
-               BM_face_calc_center_mean(f_src,    f_src_center);
+               BM_face_calc_center_median(l_dst->f, f_dst_center);
+               BM_face_calc_center_median(f_src,    f_src_center);
 
                BM_loop_interp_multires_ex(bm, l_dst, f_src, f_dst_center, f_src_center, cd_loop_mdisp_offset);
        }
@@ -555,8 +555,8 @@ void BM_face_interp_multires(BMesh *bm, BMFace *f_dst, const BMFace *f_src)
                float f_dst_center[3];
                float f_src_center[3];
 
-               BM_face_calc_center_mean(f_dst, f_dst_center);
-               BM_face_calc_center_mean(f_src, f_src_center);
+               BM_face_calc_center_median(f_dst, f_dst_center);
+               BM_face_calc_center_median(f_src, f_src_center);
 
                BM_face_interp_multires_ex(bm, f_dst, f_src, f_dst_center, f_src_center, cd_loop_mdisp_offset);
        }
index 1e53180396e9cd1ca7e667c785fdfaec0cf882fe..3e30627af0d328d710a6eef5492b6d74754a87d8 100644 (file)
@@ -828,7 +828,7 @@ void BM_editselection_center(BMEditSelection *ese, float r_center[3])
        }
        else if (ese->htype == BM_FACE) {
                BMFace *efa = (BMFace *)ese->ele;
-               BM_face_calc_center_mean(efa, r_center);
+               BM_face_calc_center_median(efa, r_center);
        }
 }
 
index e95d5239caf38f3504dcbb9cecc8bfadc90a5743..7ce908009cc677d3233be8226ba451b36d99c049 100644 (file)
@@ -299,12 +299,12 @@ BMFace *BM_face_split(
                        float f_dst_center[3];
                        float f_src_center[3];
 
-                       BM_face_calc_center_mean(f_tmp, f_src_center);
+                       BM_face_calc_center_median(f_tmp, f_src_center);
 
-                       BM_face_calc_center_mean(f, f_dst_center);
+                       BM_face_calc_center_median(f, f_dst_center);
                        BM_face_interp_multires_ex(bm, f, f_tmp, f_dst_center, f_src_center, cd_loop_mdisp_offset);
 
-                       BM_face_calc_center_mean(f_new, f_dst_center);
+                       BM_face_calc_center_median(f_new, f_dst_center);
                        BM_face_interp_multires_ex(bm, f_new, f_tmp, f_dst_center, f_src_center, cd_loop_mdisp_offset);
 
 #if 0
@@ -642,7 +642,7 @@ BMVert *BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac)
                for (i = 0; i < BLI_array_len(oldfaces); i++) {
                        float f_center_old[3];
 
-                       BM_face_calc_center_mean(oldfaces[i], f_center_old);
+                       BM_face_calc_center_median(oldfaces[i], f_center_old);
 
                        for (j = 0; j < 2; j++) {
                                BMEdge *e1 = j ? e_new : e;
@@ -660,7 +660,7 @@ BMVert *BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac)
                                        if (BM_ELEM_API_FLAG_TEST(l->f, _FLAG_OVERLAP)) {
                                                float f_center[3];
 
-                                               BM_face_calc_center_mean(l->f, f_center);
+                                               BM_face_calc_center_median(l->f, f_center);
                                                BM_face_interp_multires_ex(
                                                        bm, l->f, oldfaces[i],
                                                        f_center, f_center_old, cd_loop_mdisp_offset);
index 9751c2d8aef30ef6f5a0283b78e92ad6c4d95e25..1574a2a97c4e9b9d1fff09c2d767dffb2b24d06b 100644 (file)
@@ -108,7 +108,7 @@ static float bm_face_calc_poly_normal_vertex_cos(
 /**
  * \brief COMPUTE POLY CENTER (BMFace)
  */
-static void bm_face_calc_poly_center_mean_vertex_cos(
+static void bm_face_calc_poly_center_median_vertex_cos(
         const BMFace *f, float r_cent[3],
         float const (*vertexCos)[3])
 {
@@ -585,7 +585,7 @@ void BM_face_calc_center_bounds(const BMFace *f, float r_cent[3])
 /**
  * computes the center of a face, using the mean average
  */
-void BM_face_calc_center_mean(const BMFace *f, float r_cent[3])
+void BM_face_calc_center_median(const BMFace *f, float r_cent[3])
 {
        const BMLoop *l_iter, *l_first;
 
@@ -602,7 +602,7 @@ void BM_face_calc_center_mean(const BMFace *f, float r_cent[3])
  * computes the center of a face, using the mean average
  * weighted by edge length
  */
-void BM_face_calc_center_mean_weighted(const BMFace *f, float r_cent[3])
+void BM_face_calc_center_median_weighted(const BMFace *f, float r_cent[3])
 {
        const BMLoop *l_iter;
        const BMLoop *l_first;
@@ -880,7 +880,7 @@ float BM_face_calc_normal_subset(const BMLoop *l_first, const BMLoop *l_last, fl
 }
 
 /* exact same as 'BM_face_calc_normal' but accepts vertex coords */
-void BM_face_calc_center_mean_vcos(
+void BM_face_calc_center_median_vcos(
         const BMesh *bm, const BMFace *f, float r_cent[3],
         float const (*vertexCos)[3])
 {
@@ -888,7 +888,7 @@ void BM_face_calc_center_mean_vcos(
        BLI_assert((bm->elem_index_dirty & BM_VERT) == 0);
        (void)bm;
 
-       bm_face_calc_poly_center_mean_vertex_cos(f, r_cent, vertexCos);
+       bm_face_calc_poly_center_median_vertex_cos(f, r_cent, vertexCos);
 }
 
 /**
@@ -1103,7 +1103,7 @@ void BM_face_triangulate(
                }
 
                if (cd_loop_mdisp_offset != -1) {
-                       BM_face_calc_center_mean(f, f_center);
+                       BM_face_calc_center_median(f, f_center);
                }
 
                /* loop over calculated triangles and create new geometry */
@@ -1175,7 +1175,7 @@ void BM_face_triangulate(
 
                        if (cd_loop_mdisp_offset != -1) {
                                float f_new_center[3];
-                               BM_face_calc_center_mean(f_new, f_new_center);
+                               BM_face_calc_center_median(f_new, f_new_center);
                                BM_face_interp_multires_ex(bm, f_new, f, f_new_center, f_center, cd_loop_mdisp_offset);
                        }
                }
index 1d5fb2cc6204f4de4eb3504e71fc135ad8711ece..e8d7609fc2034787dfbada7d65e384a6c289f1ee 100644 (file)
@@ -53,11 +53,11 @@ void  BM_face_calc_tangent_edge_diagonal(const BMFace *f, float r_plane[3]) ATTR
 void  BM_face_calc_tangent_vert_diagonal(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
 void  BM_face_calc_tangent_auto(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
 void  BM_face_calc_center_bounds(const BMFace *f, float center[3]) ATTR_NONNULL();
-void  BM_face_calc_center_mean(const BMFace *f, float center[3]) ATTR_NONNULL();
-void  BM_face_calc_center_mean_vcos(
+void  BM_face_calc_center_median(const BMFace *f, float center[3]) ATTR_NONNULL();
+void  BM_face_calc_center_median_vcos(
         const BMesh *bm, const BMFace *f, float r_cent[3],
         float const (*vertexCos)[3]) ATTR_NONNULL();
-void  BM_face_calc_center_mean_weighted(const BMFace *f, float center[3]) ATTR_NONNULL();
+void  BM_face_calc_center_median_weighted(const BMFace *f, float center[3]) ATTR_NONNULL();
 
 void BM_face_calc_bounds_expand(const BMFace *f, float min[3], float max[3]);
 
index 78fb28bda2f38d03acf4a35b6e7aa54ca44e6d9a..b34cfe4120c81aac23759aa7fd5a9f6e7b986cec 100644 (file)
@@ -1860,7 +1860,7 @@ float BM_vert_calc_shell_factor_ex(const BMVert *v, const float no[3], const cha
  * \note quite an obscure function.
  * used in bmesh operators that have a relative scale options,
  */
-float BM_vert_calc_mean_tagged_edge_length(const BMVert *v)
+float BM_vert_calc_median_tagged_edge_length(const BMVert *v)
 {
        BMIter iter;
        BMEdge *e;
index 17bf0f38d0cc0205f00a71c74e145284d3cc829a..0572a6c013ac6fce5614b76b6a7263af066cfa05 100644 (file)
@@ -132,7 +132,7 @@ float   BM_vert_calc_edge_angle(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NO
 float   BM_vert_calc_edge_angle_ex(const BMVert *v, const float fallback) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 float   BM_vert_calc_shell_factor(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 float   BM_vert_calc_shell_factor_ex(const BMVert *v, const float no[3], const char hflag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-float   BM_vert_calc_mean_tagged_edge_length(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+float   BM_vert_calc_median_tagged_edge_length(const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 
 BMLoop *BM_face_find_shortest_loop(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 BMLoop *BM_face_find_longest_loop(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
index 78094d3279c00fc022820bfe6c9f3692f89c7a7d..212ff315801d324f512a0aad2ee91e159aa50ec3 100644 (file)
@@ -107,7 +107,7 @@ static int recalc_face_normals_find_index(BMesh *bm, BMFace **faces, const int f
        for (i = 0; i < faces_len; i++) {
                float f_cent[3];
                const float f_area = BM_face_calc_area(faces[i]);
-               BM_face_calc_center_mean_weighted(faces[i], f_cent);
+               BM_face_calc_center_median_weighted(faces[i], f_cent);
                madd_v3_v3fl(cent, f_cent, cent_fac * f_area);
                cent_area_accum += f_area;
 
index a0951455fb4af02d51327cf9519658a0462bff2c..a6d92301250e141ef86ae7e6b3ce977e8e0159bf 100644 (file)
@@ -67,7 +67,7 @@ void bmo_planar_faces_exec(BMesh *bm, BMOperator *op)
                        continue;
                }
 
-               BM_face_calc_center_mean_weighted(f, faces_center[i]);
+               BM_face_calc_center_median_weighted(f, faces_center[i]);
 
                l_iter = l_first = BM_FACE_FIRST_LOOP(f);
                do {
@@ -101,7 +101,7 @@ void bmo_planar_faces_exec(BMesh *bm, BMOperator *op)
                        /* keep original face data (else we 'move' the face) */
 #if 0
                        BM_face_normal_update(f);
-                       BM_face_calc_center_mean_weighted(f, f_center);
+                       BM_face_calc_center_median_weighted(f, f_center);
 #endif
 
                        plane_from_point_normal_v3(plane, faces_center[i], f->no);
index 32ad25b7b829caab3f46a759bd37ee65a6df7a5c..3d9b2edd1359eac4bade38a6ab72a81feb3c4c0d 100644 (file)
@@ -58,13 +58,13 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
 
        switch (center_mode) {
                case BMOP_POKE_MEAN_WEIGHTED:
-                       bm_face_calc_center_fn = BM_face_calc_center_mean_weighted;
+                       bm_face_calc_center_fn = BM_face_calc_center_median_weighted;
                        break;
                case BMOP_POKE_BOUNDS:
                        bm_face_calc_center_fn = BM_face_calc_center_bounds;
                        break;
                case BMOP_POKE_MEAN:
-                       bm_face_calc_center_fn = BM_face_calc_center_mean;
+                       bm_face_calc_center_fn = BM_face_calc_center_median;
                        break;
                default:
                        BLI_assert(0);
@@ -94,7 +94,7 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
                                copy_v3_v3(f_center_mean, f_center);
                        }
                        else {
-                               BM_face_calc_center_mean(f, f_center_mean);
+                               BM_face_calc_center_median(f, f_center_mean);
                        }
                }
 
@@ -132,7 +132,7 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
 
                        if (cd_loop_mdisp_offset != -1) {
                                float f_new_center[3];
-                               BM_face_calc_center_mean(f_new, f_new_center);
+                               BM_face_calc_center_median(f_new, f_new_center);
                                BM_face_interp_multires_ex(bm, f_new, f, f_new_center, f_center, cd_loop_mdisp_offset);
                        }
 
index 454d6d8c6c8634be8d429211d93c33920f1de3ce..e2da05e210e10e078b6027c2c3bb2dc9e92a6c3a 100644 (file)
@@ -155,7 +155,7 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op)
 
                                case SIMFACE_COPLANAR:
                                        /* compute the center of the polygon */
-                                       BM_face_calc_center_mean(f_ext[i].f, f_ext[i].c);
+                                       BM_face_calc_center_median(f_ext[i].f, f_ext[i].c);
 
                                        /* compute the plane distance */
                                        f_ext[i].d = dot_v3v3(f_ext[i].f->no, f_ext[i].c);
index 2faf6b814615fa11391b72db5278139448065d13..e7e42e4bd015957c49f2f59fd2fe815dd9b0a76a 100644 (file)
@@ -100,7 +100,7 @@ static void bm_decim_build_quadrics(BMesh *bm, Quadric *vquadrics)
                double plane_db[4];
                Quadric q;
 
-               BM_face_calc_center_mean(f, center);
+               BM_face_calc_center_median(f, center);
                copy_v3db_v3fl(plane_db, f->no);
                plane_db[3] = -dot_v3db_v3fl(plane_db, center);
 
index 6da32f5e8740319c46dfebe17d738d52ed8f5c96..a5a33c834a66ca1163f3668cf40c54a6f7842d52 100644 (file)
@@ -1588,7 +1588,7 @@ bool BM_mesh_intersect(
                                BLI_assert(ELEM(side, 0, 1));
                                side = !side;
 
-                               // BM_face_calc_center_mean(f, co);
+                               // BM_face_calc_center_median(f, co);
                                BM_face_calc_point_in_face(f, co);
 
                                hits = isect_bvhtree_point_v3(tree_pair[side], looptri_coords, co);
index cc5ac6dd8cee6cd4c4436bc62ff127248e7b2e29..ab1e0df6cb7acb8bd31ef447bdc76f12c2ed0fd9 100644 (file)
@@ -215,7 +215,7 @@ static float edgetag_cut_cost_face(BMEdge *e_a, BMEdge *e_b, BMFace *f)
        mid_v3_v3v3(e_a_cent, e_a->v1->co, e_a->v1->co);
        mid_v3_v3v3(e_b_cent, e_b->v1->co, e_b->v1->co);
 
-       BM_face_calc_center_mean_weighted(f, f_cent);
+       BM_face_calc_center_median_weighted(f, f_cent);
 
        return step_cost_3_v3(e_a_cent, e_b_cent, f_cent);
 }
@@ -380,8 +380,8 @@ static float facetag_cut_cost_edge(BMFace *f_a, BMFace *f_b, BMEdge *e, const vo
        float f_b_cent[3];
        float e_cent[3];
 
-       BM_face_calc_center_mean_weighted(f_a, f_a_cent);
-       BM_face_calc_center_mean_weighted(f_b, f_b_cent);
+       BM_face_calc_center_median_weighted(f_a, f_a_cent);
+       BM_face_calc_center_median_weighted(f_b, f_b_cent);
 #if 0
        mid_v3_v3v3(e_cent, e->v1->co, e->v2->co);
 #else
@@ -412,8 +412,8 @@ static float facetag_cut_cost_vert(BMFace *f_a, BMFace *f_b, BMVert *v, const vo
        float f_a_cent[3];
        float f_b_cent[3];
 
-       BM_face_calc_center_mean_weighted(f_a, f_a_cent);
-       BM_face_calc_center_mean_weighted(f_b, f_b_cent);
+       BM_face_calc_center_median_weighted(f_a, f_a_cent);
+       BM_face_calc_center_median_weighted(f_b, f_b_cent);
 
        return step_cost_3_v3_ex(
                f_a_cent, v->co, f_b_cent,
index 57e0e0b44caf3c1341488f8cac361126e6f94d19..22ba5a742cb8e22e4d56eff1c65baa15aa447321 100644 (file)
@@ -269,7 +269,7 @@ void BM_mesh_wireframe(
 
                        if (verts_relfac) {
                                if (use_relative_offset) {
-                                       verts_relfac[i] = BM_vert_calc_mean_tagged_edge_length(v_src);
+                                       verts_relfac[i] = BM_vert_calc_median_tagged_edge_length(v_src);
                                }
                                else {
                                        verts_relfac[i] = 1.0f;
@@ -315,7 +315,7 @@ void BM_mesh_wireframe(
                        verts_pos[i] = NULL;
                }
 
-               /* conflicts with BM_vert_calc_mean_tagged_edge_length */
+               /* conflicts with BM_vert_calc_median_tagged_edge_length */
                if (use_relative_offset == false) {
                        BM_elem_flag_disable(v_src, BM_ELEM_TAG);
                }
index 4f3db525c1b340a8c1388d22355eb97b102fa98b..1edfcae6c0245d4e291feedd4430c5da91d65828 100644 (file)
@@ -1701,7 +1701,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)
                                        {
index 5f49e30a1919eafc49d40f5b0f076c3306e5c048..7d1f0cceb1ed24e93a10cf46de0802cac53e70f6 100644 (file)
@@ -4981,7 +4981,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;
@@ -5049,7 +5049,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;
index dd174c7fd7a8afa82d185e19dd1874bec4ec3961..f14e08b57ea3f2b80ab4af2a9fc1f37dd01b293b 100644 (file)
@@ -3631,7 +3631,7 @@ static void draw_em_indices(BMEditMesh *em)
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col);
                BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
                        if (BM_elem_flag_test(f, BM_ELEM_SELECT)) {
-                               BM_face_calc_center_mean(f, pos);
+                               BM_face_calc_center_median(f, pos);
                                numstr_len = BLI_snprintf_rlen(numstr, sizeof(numstr), "%d", i);
                                view3d_cached_text_draw_add(pos, numstr, numstr_len, 0, txt_flag, col);
                        }
index b5d0ece305771d32c36e334b39da534528a63ea6..e3b09068ea9500700e28941935132f2f2b8319b3 100644 (file)
@@ -5618,7 +5618,7 @@ static void slide_origdata_interp_data_vert(
                BMLoop *l;
 
                BM_ITER_ELEM_INDEX (l, &liter, sv->v, BM_LOOPS_OF_VERT, j) {
-                       BM_face_calc_center_mean(l->f, faces_center[j]);
+                       BM_face_calc_center_median(l->f, faces_center[j]);
                }
 
                BM_ITER_ELEM_INDEX (l, &liter, sv->v, BM_LOOPS_OF_VERT, j) {
@@ -5628,7 +5628,7 @@ static void slide_origdata_interp_data_vert(
                        BMLoop *l_other;
                        int j_other;
 
-                       BM_face_calc_center_mean(f_copy, f_copy_center);
+                       BM_face_calc_center_median(f_copy, f_copy_center);
 
                        BM_ITER_ELEM_INDEX (l_other, &liter_other, sv->v, BM_LOOPS_OF_VERT, j_other) {
                                BM_face_interp_multires_ex(
index 088ed42b0c032a89ffadb946712aef88035e66db..7f5d332e92c33c72885476e92b44f6e9b80ba6b1 100644 (file)
@@ -889,7 +889,7 @@ static void uv_map_transform_calc_center_median(BMEditMesh *em, float r_center[3
        BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
                if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
                        float center[3];
-                       BM_face_calc_center_mean(efa, center);
+                       BM_face_calc_center_median(efa, center);
                        add_v3_v3(r_center, center);
                        center_accum_num += 1;
                }
index 13e8f232b78aefce7e02d30c3d145510c424b0af..a1d952c12ec88c9279154414755c1c157f14d76b 100644 (file)
@@ -1217,7 +1217,7 @@ static BMFace *skin_hole_target_face(BMesh *bm, Frame *frame)
                }
 
                /* Nearest test */
-               BM_face_calc_center_mean(f, poly_center);
+               BM_face_calc_center_median(f, poly_center);
                dist = len_v3v3(frame_center, poly_center);
                if (dist < best_center_dist) {
                        center_target_face = f;
index 9cd8eeb0aab2402de8b002ca8c0f88e58a6c0850..21239f7494ad32b76a5154044614e2e09a930b04 100644 (file)
@@ -1877,7 +1877,7 @@ static PyObject *bpy_bmface_calc_tangent_vert_diagonal(BPy_BMFace *self)
 }
 
 
-PyDoc_STRVAR(bpy_bmface_calc_center_mean_doc,
+PyDoc_STRVAR(bpy_bmface_calc_center_median_doc,
 ".. method:: calc_center_median()\n"
 "\n"
 "   Return median center of the face.\n"
@@ -1890,11 +1890,11 @@ static PyObject *bpy_bmface_calc_center_mean(BPy_BMFace *self)
        float cent[3];
 
        BPY_BM_CHECK_OBJ(self);
-       BM_face_calc_center_mean(self->f, cent);
+       BM_face_calc_center_median(self->f, cent);
        return Vector_CreatePyObject(cent, 3, NULL);
 }
 
-PyDoc_STRVAR(bpy_bmface_calc_center_mean_weighted_doc,
+PyDoc_STRVAR(bpy_bmface_calc_center_median_weighted_doc,
 ".. method:: calc_center_median_weighted()\n"
 "\n"
 "   Return median center of the face weighted by edge lengths.\n"
@@ -1902,12 +1902,12 @@ PyDoc_STRVAR(bpy_bmface_calc_center_mean_weighted_doc,
 "   :return: a 3D vector.\n"
 "   :rtype: :class:`mathutils.Vector`\n"
 );
-static PyObject *bpy_bmface_calc_center_mean_weighted(BPy_BMFace *self)
+static PyObject *bpy_bmface_calc_center_median_weighted(BPy_BMFace *self)
 {
        float cent[3];
 
        BPY_BM_CHECK_OBJ(self);
-       BM_face_calc_center_mean_weighted(self->f, cent);
+       BM_face_calc_center_median_weighted(self->f, cent);
        return Vector_CreatePyObject(cent, 3, NULL);
 }
 
@@ -2781,8 +2781,8 @@ static struct PyMethodDef bpy_bmface_methods[] = {
        {"calc_tangent_edge_pair", (PyCFunction)bpy_bmface_calc_tangent_edge_pair,   METH_NOARGS, bpy_bmface_calc_tangent_edge_pair_doc},
        {"calc_tangent_edge_diagonal", (PyCFunction)bpy_bmface_calc_tangent_edge_diagonal,   METH_NOARGS, bpy_bmface_calc_tangent_edge_diagonal_doc},
        {"calc_tangent_vert_diagonal", (PyCFunction)bpy_bmface_calc_tangent_vert_diagonal,   METH_NOARGS, bpy_bmface_calc_tangent_vert_diagonal_doc},
-       {"calc_center_median", (PyCFunction)bpy_bmface_calc_center_mean,   METH_NOARGS, bpy_bmface_calc_center_mean_doc},
-       {"calc_center_median_weighted", (PyCFunction)bpy_bmface_calc_center_mean_weighted, METH_NOARGS, bpy_bmface_calc_center_mean_weighted_doc},
+       {"calc_center_median", (PyCFunction)bpy_bmface_calc_center_mean,   METH_NOARGS, bpy_bmface_calc_center_median_doc},
+       {"calc_center_median_weighted", (PyCFunction)bpy_bmface_calc_center_median_weighted, METH_NOARGS, bpy_bmface_calc_center_median_weighted_doc},
        {"calc_center_bounds", (PyCFunction)bpy_bmface_calc_center_bounds, METH_NOARGS, bpy_bmface_calc_center_bounds_doc},
 
        {"normal_update",  (PyCFunction)bpy_bmface_normal_update,  METH_NOARGS,  bpy_bmface_normal_update_doc},