Fix inconsistent/broken Cycles object visibility for instances.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 18 Dec 2018 17:18:00 +0000 (18:18 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Fri, 21 Dec 2018 15:05:48 +0000 (16:05 +0100)
commit0edd93effbc1c0adf7aa9c5647ef69845496f669
tree66cf32ac697824226fa8de790b0d70ada5ce42b5
parentadec52a8a843a5224e1e59a1dfdcff4986d7dc18
Fix inconsistent/broken Cycles object visibility for instances.

Object visibility is now handled by the depsgraph iterator, but this API
was incomplete as it made no distinction for visibility of the object itself,
particles and generated instances.

The depsgraph iterator API now includes information about which part of the
object is visible, and this is used by Cycles to replace the old custom logic.
Cycles and EEVEE visibility should now be consistent, which unfortunately does
means some subtle compatibility breakage for both.

Fixes T58956, T58202, T59284.

Differential Revision: https://developer.blender.org/D4109
19 files changed:
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_sync.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/object.c
source/blender/depsgraph/DEG_depsgraph_query.h
source/blender/depsgraph/intern/depsgraph_query_iter.cc
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/draw/engines/eevee/eevee_lightcache.c
source/blender/draw/engines/eevee/eevee_render.c
source/blender/draw/engines/gpencil/gpencil_engine.c
source/blender/draw/engines/gpencil/gpencil_render.c
source/blender/draw/engines/workbench/workbench_deferred.c
source/blender/draw/engines/workbench/workbench_forward.c
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_manager.c
source/blender/draw/modes/object_mode.c
source/blender/makesdna/DNA_object_types.h
source/blender/makesrna/intern/rna_depsgraph.c