diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-14 03:01:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-14 03:06:34 +0300 |
commit | aa3c4b4cb64f5b14e5167237b1c807b5ecf658bb (patch) | |
tree | dde92dceaae332c38e92353c4758e0926be577d4 /source | |
parent | 6e2d9ef2db3776cf5f6f8a8f685da0aa668f9ae6 (diff) |
Missed last commit
Diffstat (limited to 'source')
19 files changed, 41 insertions, 41 deletions
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index af291981e7f..507a21aa273 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -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; } } } diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index b670f31ad9f..08eb2e59fb7 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -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 }; diff --git a/source/blender/bmesh/operators/bmo_poke.c b/source/blender/bmesh/operators/bmo_poke.c index 3d9b2edd135..ea84a69855d 100644 --- a/source/blender/bmesh/operators/bmo_poke.c +++ b/source/blender/bmesh/operators/bmo_poke.c @@ -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 { diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 67ce05ceb99..1ba64a61d7c 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -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) { diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 2c87bd86da1..312521d3ffb 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -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); } diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index e44a43c4c3a..e49c0132762 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -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; diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c index 3833b84b5d2..54799e3813f 100644 --- a/source/blender/editors/mesh/editmesh_inset.c +++ b/source/blender/editors/mesh/editmesh_inset.c @@ -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; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 7d1f0cceb1e..43802fa6dce 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -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"); } diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index fab2396b05a..a54000e71f4 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -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", ""); } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index fed056333c0..2628e30a7ac 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -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; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 23c445ebc3e..40026a452a6 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -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); diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 80586217691..e58ae3eb53a 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -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); } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index efa49d8907a..2b410956170 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -129,7 +129,7 @@ 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; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index a56b74983e7..b28958dfe3f 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -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: diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 79785f982c8..eb25735356a 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -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: diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index b06f22f50cc..6b53bef21b1 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -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; } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 7f5d332e92c..b94ddf1ef52 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -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; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 1b3eef0f3ec..aaf7d8c5290 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -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 */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 469acc783c3..eb9fb3fe063 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -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} }; |