diff options
Diffstat (limited to 'source')
4 files changed, 0 insertions, 78 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index ad7346a5651..7cd27ae3321 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -286,61 +286,6 @@ void OUTLINER_OT_item_openclose(wmOperatorType *ot) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Object Mode Enter/Exit Utilities - * \{ */ - -static void item_object_mode_enter_exit(bContext *C, ReportList *reports, Object *ob, bool enter) -{ - ViewLayer *view_layer = CTX_data_view_layer(C); - Object *obact = OBACT(view_layer); - - if ((ob->type != obact->type) || ID_IS_LINKED(ob->data)) { - return; - } - if (((ob->mode & obact->mode) != 0) == enter) { - return; - } - - if (ob == obact) { - BKE_report(reports, RPT_WARNING, "Active object mode not changed"); - return; - } - - Base *base = BKE_view_layer_base_find(view_layer, ob); - if (base == NULL) { - return; - } - Scene *scene = CTX_data_scene(C); - outliner_object_mode_toggle(C, scene, view_layer, base); -} - -void item_object_mode_enter_fn(bContext *C, - ReportList *reports, - Scene *UNUSED(scene), - TreeElement *UNUSED(te), - TreeStoreElem *UNUSED(tsep), - TreeStoreElem *tselem, - void *UNUSED(user_data)) -{ - Object *ob = (Object *)tselem->id; - item_object_mode_enter_exit(C, reports, ob, true); -} - -void item_object_mode_exit_fn(bContext *C, - ReportList *reports, - Scene *UNUSED(scene), - TreeElement *UNUSED(te), - TreeStoreElem *UNUSED(tsep), - TreeStoreElem *tselem, - void *UNUSED(user_data)) -{ - Object *ob = (Object *)tselem->id; - item_object_mode_enter_exit(C, reports, ob, false); -} - -/** \} */ - -/* -------------------------------------------------------------------- */ /** \name Rename Operator * \{ */ diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index e02e6118152..88080218e7f 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -281,11 +281,6 @@ void outliner_item_select(struct bContext *C, struct TreeElement *te, const short select_flag); -void outliner_object_mode_toggle(struct bContext *C, - Scene *scene, - ViewLayer *view_layer, - Base *base); - bool outliner_item_is_co_over_name_icons(const TreeElement *te, float view_co_x); bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_co_x); bool outliner_is_co_within_mode_column(SpaceOutliner *space_outliner, const float view_mval[2]); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index fe40d4cfd36..8c26f0fb07b 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -135,14 +135,6 @@ static void do_outliner_item_mode_toggle_generic(bContext *C, TreeViewContext *t } } -/* For draw callback to run mode switching */ -void outliner_object_mode_toggle(bContext *UNUSED(C), - Scene *UNUSED(scene), - ViewLayer *UNUSED(view_layer), - Base *UNUSED(base)) -{ -} - /* Toggle the item's interaction mode if supported */ void outliner_item_mode_toggle(bContext *C, TreeViewContext *tvc, diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 01b6e636ded..b6c5d860457 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1492,16 +1492,6 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op) C, op->reports, scene, space_outliner, &space_outliner->tree, item_rename_fn); str = "Rename Object"; } - else if (event == OL_OP_OBJECT_MODE_ENTER) { - outliner_do_object_operation( - C, op->reports, scene, space_outliner, &space_outliner->tree, item_object_mode_enter_fn); - str = "Enter Current Mode"; - } - else if (event == OL_OP_OBJECT_MODE_EXIT) { - outliner_do_object_operation( - C, op->reports, scene, space_outliner, &space_outliner->tree, item_object_mode_exit_fn); - str = "Exit Current Mode"; - } else { BLI_assert(0); return OPERATOR_CANCELLED; |