Layer collection enable flag
authorDalai Felinto <dfelinto@gmail.com>
Wed, 20 Sep 2017 12:15:35 +0000 (14:15 +0200)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 20 Sep 2017 12:15:35 +0000 (14:15 +0200)
commitf2db6cefa0869fe474b4fbbb467d63bff8c0935b
tree27667ef838b293e01c337cf43d47771dbe9b9814
parent42c174d1a5c6a45552210ca1d40018bc1a549c42
Layer collection enable flag

Right now this is exposed in the outliner, though all this
(visible/selectable/enable) should be moved to a new panel soon.

This removes objects from the depsgraph when the collection is disabled.

It allows you to "hide" lamps but still having them lighting the scene.
Same for light probes and other support objects.

Pending tasks:

* Have depsgraph to include invisible objects in the DEG_OBJECTS_ITER, and
then have Eevee and other engines to make a distinction between an
invisible and a visible object.

(for example, we probably want invisible objects to not show in the
viewport, but cast shadows and show up in light probes).

* Change how we evaluate collection settings so that an invisible
collection can force an object to be invisible.

Reviewers: campbellbarton

Subscribers: sergey

Differential Revision: https://developer.blender.org/D2848
source/blender/blenkernel/BKE_layer.h
source/blender/blenkernel/intern/layer.c
source/blender/editors/space_outliner/outliner_collections.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/editors/space_outliner/outliner_ops.c
source/blender/makesdna/DNA_layer_types.h
source/blender/makesrna/intern/rna_scene.c