[Bf-blender-cvs] [1353158aa24] master: Fix crash in local collections with excluded layer
Julian Eisel
noreply at git.blender.org
Thu Sep 19 15:43:11 CEST 2019
Commit: 1353158aa24b4ada82cc569543e765c5ff388e20
Author: Julian Eisel
Date: Thu Sep 19 15:39:20 2019 +0200
Branches: master
https://developer.blender.org/rB1353158aa24b4ada82cc569543e765c5ff388e20
Fix crash in local collections with excluded layer
Steps to reproduce were:
* Add a new collection
* Put an object into it
* Exclude the selection (the checkbox in front of the name)
* Enable "Local Collections" in any viewport
-> Crash
Did not skip the excluded collections, causing an unsuccessful object
lookup (returned null-pointer).
===================================================================
M source/blender/blenkernel/intern/layer.c
===================================================================
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 4198e6ded9c..a05762ba75b 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1132,7 +1132,9 @@ static void layer_collection_local_sync(ViewLayer *view_layer,
}
LISTBASE_FOREACH (LayerCollection *, child, &layer_collection->layer_collections) {
- layer_collection_local_sync(view_layer, child, local_collections_uuid, visible);
+ if ((child->flag & LAYER_COLLECTION_EXCLUDE) == 0) {
+ layer_collection_local_sync(view_layer, child, local_collections_uuid, visible);
+ }
}
}
More information about the Bf-blender-cvs
mailing list