diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-12-14 16:46:49 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-12-15 13:56:48 +0300 |
commit | 1f5106de610b115b87ab6121d7871d447ca48cd2 (patch) | |
tree | d929ef94556eac6063c24983cc6b89f52075701c /source/blender/depsgraph/DEG_depsgraph_query.h | |
parent | 7402b8ec74b4f74371d92816d22869ec9bd95da4 (diff) |
Group collection viewport/render options and remove collection visibility
Users can change the group collection visibility in the outliner
when looking at groups.
Regular collections on the other hand don't have any special visibility control,
if you need a collection to be invisible during render, either don't link it
into the view layer used for F12, or disable it.
This includes:
* Updated unittests - update your lib/tests/layers folder.
* Subversion bump - branches be aware of that.
Note:
Although we are using eval_ctx to determine the visibility of a group collection
when rendering, the depsgraph is still using the same depsgraph for the viewport
and the render engine, so at the moment the render visibility is ignored.
Following next is a workaround for this separately to tag the groups before and
after rendering to tackle that.
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_query.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index 7771d35d581..bd604289534 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -111,7 +111,7 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter); #define DEG_OBJECT_ITER(graph_, instance_, flag_) \ { \ - DEGOIterObjectData data_ = { \ + DEGOIterObjectData data_ = { \ .graph = (graph_), \ .flag = (flag_), \ }; \ @@ -119,7 +119,11 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter); ITER_BEGIN(DEG_iterator_objects_begin, \ DEG_iterator_objects_next, \ DEG_iterator_objects_end, \ - &data_, Object *, instance_) + &data_, Object *, instance_) \ + \ + if (BKE_object_is_visible(instance_) == false) { \ + continue; \ + } #define DEG_OBJECT_ITER_END \ ITER_END \ |