[Bf-blender-cvs] [aa3c4b4cb64] master: Missed last commit

Campbell Barton noreply at git.blender.org
Fri Dec 14 01:06:59 CET 2018


Commit: aa3c4b4cb64f5b14e5167237b1c807b5ecf658bb
Author: Campbell Barton
Date:   Fri Dec 14 11:01:01 2018 +1100
Branches: master
https://developer.blender.org/rBaa3c4b4cb64f5b14e5167237b1c807b5ecf658bb

Missed last commit

===================================================================

M	source/blender/blenloader/intern/versioning_260.c
M	source/blender/bmesh/intern/bmesh_operators.h
M	source/blender/bmesh/operators/bmo_poke.c
M	source/blender/editors/armature/armature_edit.c
M	source/blender/editors/gpencil/gpencil_edit.c
M	source/blender/editors/mesh/editmesh_bevel.c
M	source/blender/editors/mesh/editmesh_inset.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/object/object_transform.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/editors/space_view3d/view3d_edit.c
M	source/blender/editors/space_view3d/view3d_snap.c
M	source/blender/editors/transform/transform_conversions.c
M	source/blender/editors/transform/transform_generics.c
M	source/blender/editors/transform/transform_manipulator.c
M	source/blender/editors/transform/transform_snap.c
M	source/blender/editors/uvedit/uvedit_unwrap_ops.c
M	source/blender/makesdna/DNA_view3d_types.h
M	source/blender/makesrna/intern/rna_space.c

===================================================================

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_

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list