Depsgraph and collection enable/visibility
authorDalai Felinto <dfelinto@gmail.com>
Thu, 21 Sep 2017 10:55:14 +0000 (12:55 +0200)
committerDalai Felinto <dfelinto@gmail.com>
Thu, 21 Sep 2017 12:45:08 +0000 (14:45 +0200)
commit9ad2c0b6154b8e11521e9ee0422a79d5e0b9a2e1
tree424a2422613eb855726d8b9e1a1b679d5e58f0c1
parent77377f0ea8152d0ed5009a4940298b081b186787
Depsgraph and collection enable/visibility

Iterate over invisible objects too, so lamps can still lit the scene.
Also, now you can use a collection to set an object to invisible, not
only to visible.

For example:
Scene > Master collection > bedroom > furniture
Scene > View Layer > bedroom    (visible)
                   > furniture  (invisible)

The View Layer has two linked collections, bedroom and furniture.
This setup will make the furniture collection invisible.

Note: Unlike what was suggested on D2849, this does not make collection
visibility influence camera visibility. I will keep this as a separate
patch.

Reviewers: sergey

Subscribers: sergey, brecht, fclem

Differential Revision: https://developer.blender.org/D2849
12 files changed:
intern/cycles/blender/blender_object.cpp
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/layer.c
source/blender/blenkernel/intern/object.c
source/blender/depsgraph/intern/depsgraph_query.cc
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/draw/engines/eevee/eevee_lightprobes.c
source/blender/draw/intern/draw_manager.c
source/blender/draw/modes/object_mode.c
source/blender/editors/space_view3d/drawobject.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c