diff options
6 files changed, 12 insertions, 23 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 2d1c30734d9..b232c23b0a5 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -2739,7 +2739,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 != CTX_data_edit_object(C)) { - ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA); } notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 7f7e74a4e4e..288ee8a3598 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -131,7 +131,6 @@ void ED_object_parent(struct Object *ob, struct Object *parent, const int type, /* bitflags for enter/exit editmode */ enum { EM_FREEDATA = (1 << 0), - EM_WAITCURSOR = (1 << 1), EM_IGNORE_LAYER = (1 << 3), EM_NO_CONTEXT = (1 << 4), }; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 6be1afdcb2a..f58fc013ea2 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -396,7 +396,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_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA); } /* deselects all, sets active object */ @@ -2143,7 +2143,7 @@ static int convert_exec(bContext *C, wmOperator *op) } // XXX ED_object_editmode_enter(C, 0); -// XXX exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */ +// XXX exit_editmode(C, EM_FREEDATA|); /* freedata, but no undo */ if (basact) { /* active base was changed */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 25e3fa848d6..09ea2188de7 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -124,7 +124,6 @@ static void move_to_collection_menus_items(struct uiLayout *layout, struct MoveT /* ************* XXX **************** */ static void error(const char *UNUSED(arg)) {} -static void waitcursor(int UNUSED(val)) {} /* port over here */ static void error_libdata(void) {} @@ -517,15 +516,12 @@ bool ED_object_editmode_exit_ex(Main *bmain, Scene *scene, Object *obedit, int f { const bool freedata = (flag & EM_FREEDATA) != 0; - if (flag & EM_WAITCURSOR) waitcursor(1); - if (ED_object_editmode_load_ex(bmain, obedit, freedata) == false) { /* in rare cases (background mode) its possible active object * is flagged for editmode, without 'obedit' being set [#35489] */ if (UNLIKELY(obedit && obedit->mode & OB_MODE_EDIT)) { obedit->mode &= ~OB_MODE_EDIT; } - if (flag & EM_WAITCURSOR) waitcursor(0); return true; } @@ -552,8 +548,6 @@ bool ED_object_editmode_exit_ex(Main *bmain, Scene *scene, Object *obedit, int f obedit->mode &= ~OB_MODE_EDIT; } - if (flag & EM_WAITCURSOR) waitcursor(0); - return (obedit->mode & OB_MODE_EDIT) == 0; } @@ -583,8 +577,6 @@ bool ED_object_editmode_enter_ex(Main *bmain, Scene *scene, Object *ob, int flag return false; } - if (flag & EM_WAITCURSOR) waitcursor(1); - ob->restore_mode = ob->mode; ob->mode = OB_MODE_EDIT; @@ -649,8 +641,6 @@ bool ED_object_editmode_enter_ex(Main *bmain, Scene *scene, Object *ob, int flag WM_main_add_notifier(NC_SCENE | ND_MODE | NS_MODE_OBJECT, scene); } - if (flag & EM_WAITCURSOR) waitcursor(0); - return (ob->mode & OB_MODE_EDIT) != 0; } @@ -691,24 +681,24 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op) } if (!is_mode_set) { - ED_object_editmode_enter(C, EM_WAITCURSOR); + ED_object_editmode_enter(C, 0); if (obact->mode & mode_flag) { FOREACH_SELECTED_OBJECT_BEGIN(view_layer, v3d, ob) { if ((ob != obact) && (ob->type == obact->type)) { - ED_object_editmode_enter_ex(bmain, scene, ob, EM_WAITCURSOR | EM_NO_CONTEXT); + ED_object_editmode_enter_ex(bmain, scene, ob, EM_NO_CONTEXT); } } FOREACH_SELECTED_OBJECT_END; } } else { - ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA); if ((obact->mode & mode_flag) == 0) { FOREACH_OBJECT_BEGIN(view_layer, ob) { if ((ob != obact) && (ob->type == obact->type)) { - ED_object_editmode_exit_ex(bmain, scene, ob, EM_FREEDATA | EM_WAITCURSOR); + ED_object_editmode_exit_ex(bmain, scene, ob, EM_FREEDATA); } } FOREACH_OBJECT_END; diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index d9e069f75c2..a4bcb612e9e 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -102,10 +102,10 @@ static void do_outliner_activate_obdata(bContext *C, Scene *scene, ViewLayer *vi if (ob->type == obact->type) { bool ok; if (BKE_object_is_in_editmode(ob)) { - ok = ED_object_editmode_exit_ex(bmain, scene, ob, EM_FREEDATA | EM_WAITCURSOR); + ok = ED_object_editmode_exit_ex(bmain, scene, ob, EM_FREEDATA); } else { - ok = ED_object_editmode_enter_ex(CTX_data_main(C), scene, ob, EM_WAITCURSOR | EM_NO_CONTEXT); + ok = ED_object_editmode_enter_ex(CTX_data_main(C), scene, ob, EM_NO_CONTEXT); } if (ok) { ED_object_base_select(base, (ob->mode & OB_MODE_EDIT) ? BA_SELECT : BA_DESELECT); @@ -323,7 +323,7 @@ static eOLDrawState tree_element_set_active_object( } if (ob != OBEDIT_FROM_VIEW_LAYER(view_layer)) { - ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA); } } return OL_DRAWSEL_NORMAL; diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 5806cf28fa8..5df9d5f4ac4 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -451,7 +451,7 @@ static void object_delete_cb( // check also library later if (ob == CTX_data_edit_object(C)) { - ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA); } ED_object_base_free_and_unlink(CTX_data_main(C), scene, ob); /* leave for ED_outliner_id_unref to handle */ @@ -883,7 +883,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_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA); } outline_delete_hierarchy(C, reports, scene, base); |