diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-11-28 05:49:36 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-11-28 07:33:04 +0300 |
commit | 4de6a210c69fe254518ca8d6c860782c54f03749 (patch) | |
tree | 89e27fa2ef5531a86fe26fdde65857430d0403b2 /source/blender/depsgraph/intern/builder | |
parent | 4521d3e7074d2e08ca813e1f4a2297f5000f335b (diff) |
Per view-layer collection visibility
We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.
If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.
Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.
Development Note:
Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.
If this proves to be too slow, we can change.
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc | 5 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc index 70bd533647c..2fff8bae2b2 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc @@ -71,6 +71,11 @@ void DepsgraphNodeBuilder::build_layer_collections(ListBase *lb) COLLECTION_RESTRICT_VIEW : COLLECTION_RESTRICT_RENDER; for (LayerCollection *lc = (LayerCollection *)lb->first; lc; lc = lc->next) { + if ((graph_->mode == DAG_EVAL_VIEWPORT) && + ((lc->flag & LAYER_COLLECTION_RESTRICT_VIEW) != 0)) + { + continue; + } if (lc->collection->flag & restrict_flag) { continue; } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc index 999508cffed..6c85803dabe 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc @@ -75,6 +75,11 @@ void DepsgraphRelationBuilder::build_layer_collections(ListBase *lb) COLLECTION_RESTRICT_VIEW : COLLECTION_RESTRICT_RENDER; for (LayerCollection *lc = (LayerCollection *)lb->first; lc; lc = lc->next) { + if ((graph_->mode == DAG_EVAL_VIEWPORT) && + ((lc->flag & LAYER_COLLECTION_RESTRICT_VIEW) != 0)) + { + continue; + } if ((lc->collection->flag & restrict_flag)) { continue; } |