diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-08 17:52:42 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-08 17:55:43 +0300 |
commit | f273141556c5c7a26880d88fe164c1aec901ed53 (patch) | |
tree | 15d719a497e8f2a8e2f1ffa012e313f8cee2a640 /source | |
parent | 5aaa00ed555b14771b00eae07e89b984f09dafd9 (diff) |
Fix T64302: objects disappearing when disabling overlays
Only happened for Cycles, after recent changes.
Differential Revision: https://developer.blender.org/D4826
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index afda1b5d7e4..488027a3155 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1559,7 +1559,10 @@ void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, drw_engines_world_update(scene); /* Only iterate over objects for internal engines or when overlays are enabled */ - if ((engine_type->flag & RE_INTERNAL) != 0 || (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) { + const bool internal_engine = (engine_type->flag & RE_INTERNAL) != 0; + const bool draw_type_render = v3d->shading.type == OB_RENDER; + const bool overlays_on = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0; + if (internal_engine || overlays_on || !draw_type_render) { const int object_type_exclude_viewport = v3d->object_type_exclude_viewport; const int iter_flag = DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET | DEG_ITER_OBJECT_FLAG_VISIBLE | |