diff options
Diffstat (limited to 'source/blender/editors/space_outliner/space_outliner.c')
-rw-r--r-- | source/blender/editors/space_outliner/space_outliner.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 759ef4e78e4..0014b1f048e 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -102,10 +102,14 @@ static int outliner_parent_drop_poll(bContext *C, wmDrag *drag, const wmEvent *e if (GS(id->name) == ID_OB) { /* Ensure item under cursor is valid drop target */ TreeElement *te = outliner_dropzone_find(soops, fmval, true); + TreeStoreElem *tselem = te ? TREESTORE(te) : NULL; - if (te && te->idcode == ID_OB && TREESTORE(te)->type == 0) { + if (!te) { + /* pass */ + } + else if (te->idcode == ID_OB && tselem->type == 0) { Scene *scene; - ID *te_id = TREESTORE(te)->id; + ID *te_id = tselem->id; /* check if dropping self or parent */ if (te_id == id || (Object *)te_id == ((Object *)id)->parent) @@ -122,6 +126,10 @@ static int outliner_parent_drop_poll(bContext *C, wmDrag *drag, const wmEvent *e return 1; } } + else if (ELEM(tselem->type, TSE_LAYER_COLLECTION, TSE_SCENE_COLLECTION)) { + /* support adding object from different scene to collection */ + return 1; + } } } return 0; @@ -308,6 +316,7 @@ static void outliner_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(s case ND_RENDER_OPTIONS: case ND_SEQUENCER: case ND_LAYER: + case ND_LAYER_CONTENT: case ND_WORLD: ED_region_tag_redraw(ar); break; |