[Bf-blender-cvs] [e4f23f7e173] soc-2019-outliner: Cleanup: Comments in collection parent activation
Nathan Craddock
noreply at git.blender.org
Sat Aug 3 22:02:16 CEST 2019
Commit: e4f23f7e17346b5c1fadc29154064387bfccb7e3
Author: Nathan Craddock
Date: Sat Aug 3 14:01:42 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBe4f23f7e17346b5c1fadc29154064387bfccb7e3
Cleanup: Comments in collection parent activation
===================================================================
M source/blender/blenkernel/intern/layer.c
===================================================================
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 027cd537460..de105b9b62a 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -494,9 +494,7 @@ static LayerCollection *collection_from_index(ListBase *lb, const int number, in
}
/**
- * Return true if the elements in a collection are visible
- * Used to set active collection after excluding or restricting
- * collection visiblility
+ * Determine if a collection is hidden, viewport visibility restricted, or excluded
*/
static bool layer_collection_hidden(ViewLayer *view_layer, LayerCollection *lc)
{
@@ -569,8 +567,9 @@ LayerCollection *BKE_layer_collection_activate_parent(ViewLayer *view_layer, Lay
lc = NULL;
}
+ /* Don't activate excluded or hidden collections to prevent creating objects in a hidden
+ * collection from the UI */
if (lc && layer_collection_hidden(view_layer, lc)) {
- /* Don't activate excluded collections. */
return BKE_layer_collection_activate_parent(view_layer, lc);
}
More information about the Bf-blender-cvs
mailing list