diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-04-24 18:14:01 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-24 19:08:08 +0300 |
commit | 9b94e2a743cf6b059f5e62fbb34605bc1f3117f1 (patch) | |
tree | e40058e5c47b6eb473e86e61809cb85073296d88 /source/blender | |
parent | 8c7e0f23c2b870303a3045bc4f4a717253881b5b (diff) |
Bring back outliner hierachy delete
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 7afd4e28602..bf004db2c84 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -886,16 +886,17 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li } } -static BaseLegacy *outline_delete_hierarchy(bContext *C, ReportList *reports, Scene *scene, BaseLegacy *base) +static Base *outline_delete_hierarchy(bContext *C, ReportList *reports, Scene *scene, Base *base) { - BaseLegacy *child_base, *base_next; + Base *child_base, *base_next; Object *parent; + SceneLayer *scene_layer = CTX_data_scene_layer(C); if (!base) { return NULL; } - for (child_base = scene->base.first; child_base; child_base = base_next) { + for (child_base = scene_layer->object_bases.first; child_base; child_base = base_next) { base_next = child_base->next; for (parent = child_base->object->parent; parent && (parent != base->object); parent = parent->parent); if (parent) { @@ -926,12 +927,12 @@ static void object_delete_hierarchy_cb( bContext *C, ReportList *reports, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data)) { -#if 0 + SceneLayer *sl = CTX_data_scene_layer(C); Base *base = (Base *)te->directdata; Object *obedit = scene->obedit; if (!base) { - base = BKE_scene_base_find(scene, (Object *)tselem->id); + base = BKE_scene_layer_base_find(sl, (Object *)tselem->id); } if (base) { /* Check also library later. */ @@ -949,15 +950,6 @@ static void object_delete_hierarchy_cb( } WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); -#else - (void) C; - (void) scene; - (void) te; - (void) tselem; - (void) outline_delete_hierarchy; - BKE_reportf(reports, RPT_ERROR, "Delete from outliner not supported at the moment"); - TODO_LAYER_BASE -#endif } /* **************************************** */ |