Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c58
1 files changed, 2 insertions, 56 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index ad7346a5651..dea67a8678d 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
* \{ */
@@ -492,7 +437,8 @@ static void id_delete(bContext *C, ReportList *reports, TreeElement *te, TreeSto
Main *bmain = CTX_data_main(C);
ID *id = tselem->id;
- BLI_assert(te->idcode != 0 && id != NULL);
+ BLI_assert(id != NULL);
+ BLI_assert((tselem->type == 0 && te->idcode != 0) || tselem->type == TSE_LAYER_COLLECTION);
UNUSED_VARS_NDEBUG(te);
if (te->idcode == ID_LI && ((Library *)id)->parent != NULL) {