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:
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c20
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
}
/* **************************************** */