[Bf-blender-cvs] [f55adabb3e5] master: Cleanup: remove unused flag

Campbell Barton noreply at git.blender.org
Tue Apr 10 20:13:50 CEST 2018


Commit: f55adabb3e5d3a75ecdb30f90487e314f0afb753
Author: Campbell Barton
Date:   Tue Apr 10 20:13:31 2018 +0200
Branches: master
https://developer.blender.org/rBf55adabb3e5d3a75ecdb30f90487e314f0afb753

Cleanup: remove unused flag

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

M	source/blender/editors/animation/anim_channels_edit.c
M	source/blender/editors/include/ED_object.h
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/space_outliner/outliner_select.c
M	source/blender/editors/space_outliner/outliner_tools.c

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

diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index e9ab949dc95..8b922082fe8 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2721,7 +2721,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
 
 				/* ensure we exit editmode on whatever object was active before to avoid getting stuck there - T48747 */
 				if (ob != sce->obedit)
-					ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
+					ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);
 
 				notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
 			}
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 7faf975ea91..11dde2f5913 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -112,11 +112,12 @@ struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, st
 void ED_object_parent(struct Object *ob, struct Object *parent, const int type, const char *substr);
 
 /* bitflags for enter/exit editmode */
-#define EM_FREEDATA     1
-#define EM_FREEUNDO     2
-#define EM_WAITCURSOR   4
-#define EM_DO_UNDO      8
-#define EM_IGNORE_LAYER 16
+enum {
+	EM_FREEDATA         = (1 << 0),
+	EM_WAITCURSOR       = (1 << 1),
+	EM_DO_UNDO          = (1 << 2),
+	EM_IGNORE_LAYER     = (1 << 3),
+};
 void ED_object_editmode_exit_ex(struct bContext *C, struct Scene *scene, struct Object *obedit, int flag);
 void ED_object_editmode_exit(struct bContext *C, int flag);
 void ED_object_editmode_enter(struct bContext *C, int flag);
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 6715879361a..c6820c83f95 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -413,7 +413,7 @@ Object *ED_object_add_type(
 
 	/* for as long scene has editmode... */
 	if (CTX_data_edit_object(C)) 
-		ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);  /* freedata, and undo */
+		ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);  /* freedata, and undo */
 
 	/* deselects all, sets scene->basact */
 	ob = BKE_object_add(bmain, scene, type, name);
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index c83e25fa9c2..803b183fea1 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -658,7 +658,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op)
 	if (!is_mode_set)
 		ED_object_editmode_enter(C, EM_WAITCURSOR);
 	else
-		ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR);  /* had EM_DO_UNDO but op flag calls undo too [#24685] */
+		ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR);  /* had EM_DO_UNDO but op flag calls undo too [#24685] */
 	
 	ED_space_image_uv_sculpt_update(CTX_wm_manager(C), scene);
 
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 7166e870f6e..305afc206c4 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -241,7 +241,7 @@ static eOLDrawState tree_element_set_active_object(
 	}
 	
 	if (ob != scene->obedit)
-		ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
+		ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);
 		
 	return OL_DRAWSEL_NORMAL;
 }
@@ -715,7 +715,7 @@ static eOLDrawState tree_element_active_pose(
 
 	if (set != OL_SETSEL_NONE) {
 		if (scene->obedit)
-			ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
+			ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);
 		
 		if (ob->mode & OB_MODE_POSE)
 			ED_armature_exit_posemode(C, base);
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 84711bf7c3c..e8275d597a6 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -418,7 +418,7 @@ static void object_delete_cb(
 
 		// check also library later
 		if (scene->obedit == base->object)
-			ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
+			ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);
 		
 		ED_base_object_free_and_unlink(CTX_data_main(C), scene, base);
 		/* leave for ED_outliner_id_unref to handle */
@@ -873,7 +873,7 @@ static void object_delete_hierarchy_cb(
 		/* Check also library later. */
 		for (; obedit && (obedit != base->object); obedit = obedit->parent);
 		if (obedit == base->object) {
-			ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
+			ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);
 		}
 
 		outline_delete_hierarchy(C, reports, scene, base);



More information about the Bf-blender-cvs mailing list