[Bf-blender-cvs] [641d870b375] blender2.8: Tag properties of transform operators as 'advanced'

Julian Eisel noreply at git.blender.org
Thu Nov 23 14:26:37 CET 2017


Commit: 641d870b375ad492157b4eba31b480f38ab85aa0
Author: Julian Eisel
Date:   Thu Nov 23 14:21:40 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB641d870b375ad492157b4eba31b480f38ab85aa0

Tag properties of transform operators as 'advanced'

Sets the 'advanced' tag for some properties of following transform operators:
* Create Orientation
* Translate
* Resize
* Skin Resize
* Trackball
* Rotate
* Tilt
* Bend
* Shear
* Push/Pull
* Shrink/Flatten
* To Sphere
* Edge Slide
* Vertex Slide
* Edge Crease
* Edge Bevel Weight
* Sequence Slide
* Transform

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

M	source/blender/editors/transform/transform_ops.c

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

diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index ad855427ff1..ab0e24671eb 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -283,6 +283,9 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot)
 	RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the new custom orientation");
 	RNA_def_boolean(ot->srna, "use_view", false, "Use View",
 	                "Use the current view instead of the active object to create the new orientation");
+
+	WM_operatortype_props_advanced_begin(ot);
+
 	RNA_def_boolean(ot->srna, "use", false, "Use after creation", "Select orientation after its creation");
 	RNA_def_boolean(ot->srna, "overwrite", false, "Overwrite previous",
 	                "Overwrite previously created orientation with same name");
@@ -593,6 +596,8 @@ static void TRANSFORM_OT_translate(struct wmOperatorType *ot)
 
 	RNA_def_float_vector_xyz(ot->srna, "value", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP | P_OPTIONS | P_GPENCIL_EDIT);
 }
 
@@ -613,6 +618,8 @@ static void TRANSFORM_OT_resize(struct wmOperatorType *ot)
 
 	RNA_def_float_vector(ot->srna, "value", 3, VecOne, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(
 	        ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_GPENCIL_EDIT | P_CENTER);
 }
@@ -644,6 +651,8 @@ static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot)
 
 	RNA_def_float_vector(ot->srna, "value", 3, VecOne, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_NO_TEXSPACE);
 }
 
@@ -665,6 +674,8 @@ static void TRANSFORM_OT_trackball(struct wmOperatorType *ot)
 	/* Maybe we could use float_vector_xyz here too? */
 	RNA_def_float_rotation(ot->srna, "value", 2, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_CENTER);
 }
 
@@ -685,6 +696,8 @@ static void TRANSFORM_OT_rotate(struct wmOperatorType *ot)
 
 	RNA_def_float_rotation(ot->srna, "value", 0, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(
 	        ot, P_AXIS | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_GPENCIL_EDIT | P_CENTER);
 }
@@ -709,6 +722,8 @@ static void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
 
 	RNA_def_float_rotation(ot->srna, "value", 0, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP);
 }
 
@@ -729,6 +744,8 @@ static void TRANSFORM_OT_bend(struct wmOperatorType *ot)
 
 	RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_CENTER);
 }
 
@@ -749,6 +766,8 @@ static void TRANSFORM_OT_shear(struct wmOperatorType *ot)
 
 	RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Offset", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT);
 	// XXX Shear axis?
 }
@@ -770,6 +789,8 @@ static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)
 
 	RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Distance", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_CENTER);
 }
 
@@ -792,6 +813,8 @@ static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
 
 	RNA_def_boolean(ot->srna, "use_even_offset", true, "Offset Even", "Scale the offset to give more even thickness");
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP);
 }
 
@@ -813,6 +836,8 @@ static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot)
 
 	RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_CENTER);
 }
 
@@ -857,6 +882,9 @@ static void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot)
 	RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 	RNA_def_boolean(ot->srna, "use_even", false, "Even",
 	                "Make the edge loop match the shape of the adjacent edge loop");
+
+	WM_operatortype_props_advanced_begin(ot);
+
 	RNA_def_boolean(ot->srna, "flipped", false, "Flipped",
 	                "When Even mode is active, flips between the two adjacent edge loops");
 	RNA_def_boolean(ot->srna, "use_clamp", true, "Clamp",
@@ -883,6 +911,9 @@ static void TRANSFORM_OT_vert_slide(struct wmOperatorType *ot)
 	RNA_def_float_factor(ot->srna, "value", 0, -10.0f, 10.0f, "Factor", "", -1.0f, 1.0f);
 	RNA_def_boolean(ot->srna, "use_even", false, "Even",
 	                "Make the edge loop match the shape of the adjacent edge loop");
+
+	WM_operatortype_props_advanced_begin(ot);
+
 	RNA_def_boolean(ot->srna, "flipped", false, "Flipped",
 	                "When Even mode is active, flips between the two adjacent edge loops");
 	RNA_def_boolean(ot->srna, "use_clamp", true, "Clamp",
@@ -908,6 +939,8 @@ static void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
 
 	RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_SNAP);
 }
 
@@ -949,6 +982,8 @@ static void TRANSFORM_OT_edge_bevelweight(struct wmOperatorType *ot)
 
 	RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_SNAP);
 }
 
@@ -969,6 +1004,8 @@ static void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
 
 	RNA_def_float_vector_xyz(ot->srna, "value", 2, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(ot, P_SNAP);
 }
 
@@ -994,6 +1031,8 @@ static void TRANSFORM_OT_transform(struct wmOperatorType *ot)
 
 	RNA_def_float_vector(ot->srna, "value", 4, NULL, -FLT_MAX, FLT_MAX, "Values", "", -FLT_MAX, FLT_MAX);
 
+	WM_operatortype_props_advanced_begin(ot);
+
 	Transform_Properties(
 	        ot, P_AXIS | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP | P_GPENCIL_EDIT | P_CENTER);
 }



More information about the Bf-blender-cvs mailing list