diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-02-06 19:12:25 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-02-06 19:13:40 +0300 |
commit | e3a3782d7faf4ce9ecdf91b3920aa554afaf77c1 (patch) | |
tree | cd68aebbd8720076d6e5414ecbf9a0ad84715676 /source/blender/blenkernel/intern | |
parent | fb15dfbddf0ab65cae01e0620abdd7bb046a7aba (diff) |
Outliner visibility unification: Prevent master collection visibility to change
Also satinizing the checks for master collection. The outliner tree
iterators already take care of not including the master collection
there.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 20fc0461ab6..6d4c2072ce2 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -1014,16 +1014,17 @@ static bool layer_collection_collection_flag_unset_recursive(LayerCollection *lc bool BKE_layer_collection_isolate(Scene *scene, ViewLayer *view_layer, LayerCollection *lc, bool extend) { bool depsgraph_need_update = false; + LayerCollection *lc_master = view_layer->layer_collections.first; + if (!extend) { /* Hide all collections . */ - for (LayerCollection *lc_iter = view_layer->layer_collections.first; lc_iter; lc_iter = lc_iter->next) { + for (LayerCollection *lc_iter = lc_master->layer_collections.first; lc_iter; lc_iter = lc_iter->next) { layer_collection_flag_set_recursive(lc_iter, LAYER_COLLECTION_RESTRICT_VIEW); } } /* Make all the direct parents visible. */ LayerCollection *lc_parent = lc; - LayerCollection *lc_master = view_layer->layer_collections.first; for (LayerCollection *lc_iter = lc_master->layer_collections.first; lc_iter; lc_iter = lc_iter->next) { if (BKE_layer_collection_has_layer_collection(lc_iter, lc)) { lc_parent = lc_iter; |