diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-05-13 18:30:39 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-05-15 14:32:15 +0300 |
commit | 0a32f6c8686c6a14a052f5b254655b3b69a581e3 (patch) | |
tree | 2fa3aa373b80ece8d8c0e2979e1eabf59f8f7b65 /source/blender/editors/space_outliner/outliner_dragdrop.c | |
parent | 0ae64a9945db9f3d00ba7ef3780e25e16fabf664 (diff) |
Fix T76710: objects get lost in linked/overridden collections
Right now:
- drag-drop in the Outliner prevents dropping inside linked collections
- drag-drop in the Outliner allows dropping inside overridden
collections (should not be the case)
- `Object Properties` > `Collections` panel allows to add to overridden
collection (should not be the case)
- `Object Properties` > `Collections` panel filters out non-local
collections (so adding to linked collections is forbidden)
- `bpy collection.objects.link()` allows to add to linked collections
(should not be the case)
- `bpy collection.objects.link()` allows to add to overridden
collections (should not be the case)
While this might be supported in the future for overriden collections,
these cases should not be allowed atm. since objects get lost on file
reload.
Note: for the case of the `Object Properties` > `Collections` panel,
this could be improved further to filter out overridden collections as
well.
Reviewers: mont29, brecht
Subscribers:
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_dragdrop.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_dragdrop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index 44e5347dcad..c2c9f3a5bfb 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -675,6 +675,10 @@ static bool collection_drop_init(bContext *C, if (ID_IS_LINKED(to_collection)) { return false; } + /* Currently this should not be allowed (might be supported in the future though...). */ + if (ID_IS_OVERRIDE_LIBRARY(to_collection)) { + return false; + } /* Get drag datablocks. */ if (drag->type != WM_DRAG_ID) { |