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

This is strictly forbidden, and sill cause crashes with undo in some
cases...
This commit is contained in:
Bastien Montagne 2020-07-21 11:47:13 +02:00
parent 8c916a3aec
commit b277a75a3b
1 changed files with 2 additions and 1 deletions

View File

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