diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-02-09 01:09:37 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-02-09 01:09:37 +0300 |
commit | 191b8951f7afae26117cc5386b979557b84dc437 (patch) | |
tree | e2fbdb39117f77c1856df365a0ffcf0b9b2b3626 /source/blender/blenkernel/intern | |
parent | e04d6794d017b82f33a893bfc959cebd909d3176 (diff) |
Outliner visibility: Prevent changing linked objects and collections
We still change their base/layer collection visibility, just not what would change the
original ID datablock.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 993df715218..d660e5e6424 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -1005,9 +1005,11 @@ bool BKE_layer_collection_isolate(Scene *scene, ViewLayer *view_layer, LayerColl bool depsgraph_need_update = false; LayerCollection *lc_master = view_layer->layer_collections.first; - if (lc->collection->flag & COLLECTION_RESTRICT_VIEW) { - lc->collection->flag &= ~COLLECTION_RESTRICT_VIEW; - depsgraph_need_update = true; + if (lc->collection->id.lib == NULL) { + if (lc->collection->flag & COLLECTION_RESTRICT_VIEW) { + lc->collection->flag &= ~COLLECTION_RESTRICT_VIEW; + depsgraph_need_update = true; + } } if (!extend) { @@ -1027,9 +1029,11 @@ bool BKE_layer_collection_isolate(Scene *scene, ViewLayer *view_layer, LayerColl } while (lc_parent != lc) { - if (lc_parent->collection->flag & COLLECTION_RESTRICT_VIEW) { - lc_parent->collection->flag &= ~COLLECTION_RESTRICT_VIEW; - depsgraph_need_update = true; + if (lc_parent->collection->id.lib == NULL) { + if (lc_parent->collection->flag & COLLECTION_RESTRICT_VIEW) { + lc_parent->collection->flag &= ~COLLECTION_RESTRICT_VIEW; + depsgraph_need_update = true; + } } lc_parent->flag &= ~LAYER_COLLECTION_RESTRICT_VIEW; @@ -1084,7 +1088,10 @@ bool BKE_layer_collection_set_visible(ViewLayer *view_layer, LayerCollection *lc { bool depsgraph_changed = false; - if (visible && ((lc->collection->flag & COLLECTION_RESTRICT_VIEW) != 0)) { + if (visible && + (lc->collection->id.lib == NULL) && + ((lc->collection->flag & COLLECTION_RESTRICT_VIEW) != 0)) + { lc->collection->flag &= ~COLLECTION_RESTRICT_VIEW; depsgraph_changed = true; } |