diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-25 13:26:09 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-25 17:45:46 +0300 |
commit | 885cda65c90b3f85dc4e72e2e9759aa926a8f07c (patch) | |
tree | d601542cc569bd1dd4fa1392000ecb917308a758 /source/blender/blenkernel/intern/layer.c | |
parent | e6e8ee2922c023971c11a566cba8085c3dd70e76 (diff) |
Cycles: add per layer collection indirectly on setting.
In the outliner, right click > view layer > set indirect only. This is
like clearing camera ray visibility on objects in the collection, and is
temporary until we have more general dynamic overrides.
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 73a217b8865..1396ad1f97c 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -715,10 +715,13 @@ static int layer_collection_sync( lc->runtime_flag |= LAYER_COLLECTION_HAS_VISIBLE_OBJECTS; } - /* Holdout */ + /* Holdout and indirect only */ if (lc->flag & LAYER_COLLECTION_HOLDOUT) { base->flag |= BASE_HOLDOUT; } + if (lc->flag & LAYER_COLLECTION_INDIRECT_ONLY) { + base->flag |= BASE_INDIRECT_ONLY; + } lc->runtime_flag |= LAYER_COLLECTION_HAS_OBJECTS; } @@ -760,7 +763,8 @@ void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer) BASE_SELECTABLE | BASE_ENABLED_VIEWPORT | BASE_ENABLED_RENDER | - BASE_HOLDOUT); + BASE_HOLDOUT | + BASE_INDIRECT_ONLY); } view_layer->runtime_flag = 0; |