Missed last commit
authorCampbell Barton <ideasman42@gmail.com>
Fri, 14 Dec 2018 00:01:01 +0000 (11:01 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 14 Dec 2018 00:06:34 +0000 (11:06 +1100)
19 files changed:
source/blender/blenloader/intern/versioning_260.c
source/blender/bmesh/intern/bmesh_operators.h
source/blender/bmesh/operators/bmo_poke.c
source/blender/editors/armature/armature_edit.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/mesh/editmesh_bevel.c
source/blender/editors/mesh/editmesh_inset.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_transform.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesrna/intern/rna_space.c

index af29198..507a21a 100644 (file)
@@ -1388,7 +1388,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
                                                        SpaceClip *sclip = (SpaceClip *)sl;
 
                                                        if (sclip->around == 0) {
-                                                               sclip->around = V3D_AROUND_CENTER_MEAN;
+                                                               sclip->around = V3D_AROUND_CENTER_MEDIAN;
                                                        }
                                                }
                                        }
index b670f31..08eb2e5 100644 (file)
@@ -114,8 +114,8 @@ enum {
 
 /* Poke face center calculation */
 enum {
-       BMOP_POKE_MEAN_WEIGHTED = 0,
-       BMOP_POKE_MEAN,
+       BMOP_POKE_MEDIAN_WEIGHTED = 0,
+       BMOP_POKE_MEDIAN,
        BMOP_POKE_BOUNDS
 };
 
index 3d9b2ed..ea84a69 100644 (file)
@@ -57,13 +57,13 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
        void (*bm_face_calc_center_fn)(const BMFace *f, float r_cent[3]);
 
        switch (center_mode) {
-               case BMOP_POKE_MEAN_WEIGHTED:
+               case BMOP_POKE_MEDIAN_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:
+               case BMOP_POKE_MEDIAN:
                        bm_face_calc_center_fn = BM_face_calc_center_median;
                        break;
                default:
@@ -90,7 +90,7 @@ void bmo_poke_exec(BMesh *bm, BMOperator *op)
                BMO_vert_flag_enable(bm, v_center, ELE_NEW);
 
                if (cd_loop_mdisp_offset != -1) {
-                       if (center_mode == BMOP_POKE_MEAN) {
+                       if (center_mode == BMOP_POKE_MEDIAN) {
                                copy_v3_v3(f_center_mean, f_center);
                        }
                        else {
index 67ce05c..1ba64a6 100644 (file)
@@ -159,7 +159,7 @@ void ED_armature_origin_set(Main *bmain, Scene *scene, Object *ob, float cursor[
                mul_m4_v3(ob->imat, cent);
        }
        else {
-               if (around == V3D_AROUND_CENTER_MEAN) {
+               if (around == V3D_AROUND_CENTER_MEDIAN) {
                        int total = 0;
                        zero_v3(cent);
                        for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
index 2c87bd8..312521d 100644 (file)
@@ -1605,7 +1605,7 @@ static int gp_snap_cursor_to_sel(bContext *C, wmOperator *UNUSED(op))
                }
        }
 
-       if (v3d->around == V3D_AROUND_CENTER_MEAN && count) {
+       if (v3d->around == V3D_AROUND_CENTER_MEDIAN && count) {
                mul_v3_fl(centroid, 1.0f / (float)count);
                copy_v3_v3(cursor, centroid);
        }
index e44a43c..e49c013 100644 (file)
@@ -333,7 +333,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;
index 3833b84..54799e3 100644 (file)
@@ -292,7 +292,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;
index 7d1f0cc..43802fa 100644 (file)
@@ -4049,9 +4049,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}};
 
 
@@ -4069,7 +4069,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");
 }
 
index fab2396..a54000e 100644 (file)
@@ -798,7 +798,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                                mul_m4_v3(obedit->imat, cent);
                        }
                        else {
-                               if (around == V3D_AROUND_CENTER_MEAN) {
+                               if (around == V3D_AROUND_CENTER_MEDIAN) {
                                        if (em->bm->totvert) {
                                                const float total_div = 1.0f / (float)em->bm->totvert;
                                                BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
@@ -913,7 +913,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                                else if (centermode == ORIGIN_TO_CENTER_OF_MASS_VOLUME) {
                                        BKE_mesh_center_of_volume(me, cent);
                                }
-                               else if (around == V3D_AROUND_CENTER_MEAN) {
+                               else if (around == V3D_AROUND_CENTER_MEDIAN) {
                                        BKE_mesh_center_median(me, cent);
                                }
                                else {
@@ -930,9 +930,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                        else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
                                Curve *cu = ob->data;
 
-                               if      (centermode == ORIGIN_TO_CURSOR)    { /* done */ }
-                               else if (around == V3D_AROUND_CENTER_MEAN)  { BKE_curve_center_median(cu, cent); }
-                               else                                        { BKE_curve_center_bounds(cu, cent); }
+                               if      (centermode == ORIGIN_TO_CURSOR)     { /* done */ }
+                               else if (around == V3D_AROUND_CENTER_MEDIAN) { BKE_curve_center_median(cu, cent); }
+                               else                                         { BKE_curve_center_bounds(cu, cent); }
 
                                /* don't allow Z change if curve is 2D */
                                if ((ob->type == OB_CURVE) && !(cu->flag & CU_3D))
@@ -1012,9 +1012,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                        else if (ob->type == OB_MBALL) {
                                MetaBall *mb = ob->data;
 
-                               if      (centermode == ORIGIN_TO_CURSOR)    { /* done */ }
-                               else if (around == V3D_AROUND_CENTER_MEAN)  { BKE_mball_center_median(mb, cent); }
-                               else                                        { BKE_mball_center_bounds(mb, cent); }
+                               if      (centermode == ORIGIN_TO_CURSOR)     { /* done */ }
+                               else if (around == V3D_AROUND_CENTER_MEDIAN) { BKE_mball_center_median(mb, cent); }
+                               else                                         { BKE_mball_center_bounds(mb, cent); }
 
                                negate_v3_v3(cent_neg, cent);
                                BKE_mball_translate(mb, cent_neg);
@@ -1033,9 +1033,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                        else if (ob->type == OB_LATTICE) {
                                Lattice *lt = ob->data;
 
-                               if      (centermode == ORIGIN_TO_CURSOR)    { /* done */ }
-                               else if (around == V3D_AROUND_CENTER_MEAN)  { BKE_lattice_center_median(lt, cent); }
-                               else                                        { BKE_lattice_center_bounds(lt, cent); }
+                               if      (centermode == ORIGIN_TO_CURSOR)     { /* done */ }
+                               else if (around == V3D_AROUND_CENTER_MEDIAN) { BKE_lattice_center_median(lt, cent); }
+                               else                                         { BKE_lattice_center_bounds(lt, cent); }
 
                                negate_v3_v3(cent_neg, cent);
                                BKE_lattice_translate(lt, cent_neg, 1);
@@ -1138,7 +1138,7 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
        };
 
        static const EnumPropertyItem prop_set_bounds_types[] = {
-               {V3D_AROUND_CENTER_MEAN, "MEDIAN", 0, "Median Center", ""},
+               {V3D_AROUND_CENTER_MEDIAN, "MEDIAN", 0, "Median Center", ""},
                {V3D_AROUND_CENTER_BOUNDS, "BOUNDS", 0, "Bounds Center", ""},
                {0, NULL, 0, NULL, NULL}
        };
@@ -1158,5 +1158,5 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        ot->prop = RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", "");
-       RNA_def_enum(ot->srna, "center", prop_set_bounds_types, V3D_AROUND_CENTER_MEAN, "Center", "");
+       RNA_def_enum(ot->srna, "center", prop_set_bounds_types, V3D_AROUND_CENTER_MEDIAN, "Center", "");
 }
index fed0563..2628e30 100644 (file)
@@ -337,7 +337,7 @@ static SpaceLink *view3d_new(const bContext *C)
 
        v3d->twflag |= U.tw_flag & V3D_USE_MANIPULATOR;
        v3d->twtype = V3D_MANIP_TRANSLATE;
-       v3d->around = V3D_AROUND_CENTER_MEAN;
+       v3d->around = V3D_AROUND_CENTER_MEDIAN;
 
        v3d->bundle_size = 0.2f;
        v3d->bundle_drawtype = OB_PLAINAXES;
index 23c445e..40026a4 100644 (file)
@@ -316,7 +316,7 @@ static bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
        }
        else {
                /* If there's no selection, lastofs is unmodified and last value since static */
-               is_set = calculateTransformCenter(C, V3D_AROUND_CENTER_MEAN, lastofs, NULL);
+               is_set = calculateTransformCenter(C, V3D_AROUND_CENTER_MEDIAN, lastofs, NULL);
        }
 
        copy_v3_v3(r_dyn_ofs, lastofs);
index 8058621..e58ae3e 100644 (file)
@@ -579,7 +579,7 @@ static bool snap_curs_to_sel_ex(bContext *C, float cursor[3])
                        minmax_v3v3_v3(min, max, vec);
                }
 
-               if (v3d->around == V3D_AROUND_CENTER_MEAN) {
+               if (v3d->around == V3D_AROUND_CENTER_MEDIAN) {
                        mul_v3_fl(centroid, 1.0f / (float)tvs.transverts_tot);
                        copy_v3_v3(cursor, centroid);
                }
@@ -631,7 +631,7 @@ static bool snap_curs_to_sel_ex(bContext *C, float cursor[3])
                        return false;
                }
 
-               if (v3d->around == V3D_AROUND_CENTER_MEAN) {
+               if (v3d->around == V3D_AROUND_CENTER_MEDIAN) {
                        mul_v3_fl(centroid, 1.0f / (float)count);
                        copy_v3_v3(cursor, centroid);
                }
index efa49d8..2b41095 100644 (file)
 static void transform_around_single_fallback(TransInfo *t)
 {
        if ((t->total == 1) &&
-           (ELEM(t->around, V3D_AROUND_CENTER_BOUNDS, V3D_AROUND_CENTER_MEAN, V3D_AROUND_ACTIVE)) &&
+           (ELEM(t->around, V3D_AROUND_CENTER_BOUNDS, V3D_AROUND_CENTER_MEDIAN, V3D_AROUND_ACTIVE)) &&
            (ELEM(t->mode, TFM_RESIZE, TFM_ROTATION, TFM_TRACKBALL)))
        {
                t->around = V3D_AROUND_LOCAL_ORIGINS;
index a56b749..b28958d 100644 (file)
@@ -1838,7 +1838,7 @@ static void calculateCenter_FromAround(TransInfo *t, int around, float r_center[
                case V3D_AROUND_CENTER_BOUNDS:
                        calculateCenterBound(t, r_center);
                        break;
-               case V3D_AROUND_CENTER_MEAN:
+               case V3D_AROUND_CENTER_MEDIAN:
                        calculateCenterMedian(t, r_center);
                        break;
                case V3D_AROUND_CURSOR:
index 79785f9..eb25735 100644 (file)
@@ -1679,7 +1679,7 @@ void BIF_draw_manipulator(const bContext *C)
                                break;
                        }
                        case V3D_AROUND_LOCAL_ORIGINS:
-                       case V3D_AROUND_CENTER_MEAN:
+                       case V3D_AROUND_CENTER_MEDIAN:
                                copy_v3_v3(rv3d->twmat[3], tbounds.center);
                                break;
                        case V3D_AROUND_CURSOR:
index b06f22f..6b53bef 100644 (file)
@@ -1522,7 +1522,7 @@ static void applyGridIncrement(TransInfo *t, float *val, int max_index, const fl
                 * this isn't useful as a global center for absolute grid snapping
                 * since its not based on the position of the selection. */
                if (t->around == V3D_AROUND_CURSOR) {
-                       const TransCenterData *cd = transformCenter_from_type(t, V3D_AROUND_CENTER_MEAN);
+                       const TransCenterData *cd = transformCenter_from_type(t, V3D_AROUND_CENTER_MEDIAN);
                        center_global = cd->global;
                }
 
index 7f5d332..b94ddf1 100644 (file)
@@ -917,7 +917,7 @@ static void uv_map_transform_center(
                        mid_v3_v3v3(r_center, bounds[0], bounds[1]);
                        break;
                }
-               case V3D_AROUND_CENTER_MEAN:
+               case V3D_AROUND_CENTER_MEDIAN:
                {
                        uv_map_transform_calc_center_median(em, r_center);
                        break;
index 1b3eef0..aaf7d8c 100644 (file)
@@ -321,7 +321,7 @@ enum {
        /* center of the bounding box */
        V3D_AROUND_CENTER_BOUNDS        = 0,
        /* center from the sum of all points divided by the total */
-       V3D_AROUND_CENTER_MEAN          = 3,
+       V3D_AROUND_CENTER_MEDIAN    = 3,
        /* pivot around the 2D/3D cursor */
        V3D_AROUND_CURSOR                       = 1,
        /* pivot around each items own origin */
index 469acc7..eb9fb3f 100644 (file)
@@ -139,7 +139,7 @@ static const EnumPropertyItem pivot_items_full[] = {
        {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Pivot around the 3D cursor"},
        {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION,
                    "Individual Origins", "Pivot around each object's own origin"},
-       {V3D_AROUND_CENTER_MEAN, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point",
+       {V3D_AROUND_CENTER_MEDIAN, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point",
                       "Pivot around the median point of selected objects"},
        {V3D_AROUND_ACTIVE, "ACTIVE_ELEMENT", ICON_ROTACTIVE, "Active Element", "Pivot around active object"},
        {0, NULL, 0, NULL, NULL}
@@ -976,7 +976,7 @@ static const EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED
 {
        static const EnumPropertyItem pivot_items[] = {
                {V3D_AROUND_CENTER_BOUNDS, "CENTER", ICON_ROTATE, "Bounding Box Center", ""},
-               {V3D_AROUND_CENTER_MEAN, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""},
+               {V3D_AROUND_CENTER_MEDIAN, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""},
                {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
                {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION,
                            "Individual Origins", "Pivot around each selected island's own median point"},
@@ -3530,7 +3530,7 @@ static void rna_def_space_graph(BlenderRNA *brna)
                {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""},
                {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
                {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Centers", ""},
-               /*{V3D_AROUND_CENTER_MEAN, "MEDIAN_POINT", 0, "Median Point", ""}, */
+               /*{V3D_AROUND_CENTER_MEDIAN, "MEDIAN_POINT", 0, "Median Point", ""}, */
                /*{V3D_AROUND_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""}, */
                {0, NULL, 0, NULL, NULL}
        };
@@ -4568,7 +4568,7 @@ static void rna_def_space_clip(BlenderRNA *brna)
                {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", "Pivot around the 2D cursor"},
                {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION,
                            "Individual Origins", "Pivot around each object's own origin"},
-               {V3D_AROUND_CENTER_MEAN, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point",
+               {V3D_AROUND_CENTER_MEDIAN, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point",
                               "Pivot around the median point of selected objects"},
                {0, NULL, 0, NULL, NULL}
        };