Commit: b277a75a3b5f77158a60d843be6c012837c70f39
Author: Bastien Montagne
Date:   Tue Jul 21 11:47:13 2020 +0200
Branches: master
https://developer.blender.org/rBb277a75a3b5f77158a60d843be6c012837c70f39

Fix (unreported) LibOverride creation adding things to linked collections.

This is strictly forbidden, and sill cause crashes with undo in some
cases...

===================================================================

M       source/blender/blenkernel/intern/lib_override.c

===================================================================

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");
                   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to