diff options
author | Bastien Montagne <bastien@blender.org> | 2020-07-21 12:47:13 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-07-21 12:59:50 +0300 |
commit | b277a75a3b5f77158a60d843be6c012837c70f39 (patch) | |
tree | b63bde36231f383f2b1f6482fc786189db5eb7b5 /source/blender/blenkernel | |
parent | 8c916a3aecc49351dbbb0d22c8bc0e5712b9e9ac (diff) |
Fix (unreported) LibOverride creation adding things to linked collections.
This is strictly forbidden, and sill cause crashes with undo in some
cases...
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 322149bc3ce..02e9085284f 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -571,7 +571,8 @@ bool BKE_lib_override_library_create( Object *ob_root = (Object *)id_root; LISTBASE_FOREACH (Collection *, collection, &bmain->collections) { if (BKE_collection_has_object(collection, ob_root) && - BKE_view_layer_has_collection(view_layer, collection)) { + BKE_view_layer_has_collection(view_layer, collection) && + !ID_IS_LINKED(collection) && !ID_IS_OVERRIDE_LIBRARY(collection)) { default_instantiating_collection = BKE_collection_add( bmain, collection, "OVERRIDE_HIDDEN"); } |