diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-28 10:11:55 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-29 15:48:59 +0300 |
commit | 2069b3b888db7ca448317218d3d42234b7fa77eb (patch) | |
tree | aaa7491de143cb7a765b42ecc29b87de79d94bc7 /source/blender/depsgraph/intern/depsgraph.cc | |
parent | 56176bd19ece34166b17a799c0ff522556927ac9 (diff) |
DrawManager: Cycles+GPencil
Fix for GPencil and Cycles Render draw type. GPencil objects were only
shown when overlays were turned on. The cause of this is an
optimization we did to not populate any draw engine when an
external renderer was used with overlays turned off.
This will check if there is any visible GPencil object in the scene. if
so it will still perform the loop.
`DEG_id_type_any_exists` can check if any object of a certain type_id is in the
result. This check is also being used to check if there are any
visible grease pencil objects as a precheck in `DRW_render_check_grease_pencil`.
Reviewed By: brecht, fclem, antoniov
Maniphest Tasks: T65191
Differential Revision: https://developer.blender.org/D4962
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index 5d96bfad95e..d8a9b41206b 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -38,6 +38,7 @@ extern "C" { #include "BKE_scene.h" #include "BKE_global.h" +#include "BKE_idcode.h" } #include "DEG_depsgraph.h" @@ -81,6 +82,7 @@ Depsgraph::Depsgraph(Scene *scene, ViewLayer *view_layer, eEvaluationMode mode) entry_tags = BLI_gset_ptr_new("Depsgraph entry_tags"); debug_flags = G.debug; memset(id_type_updated, 0, sizeof(id_type_updated)); + memset(id_type_exist, 0, sizeof(id_type_exist)); memset(physics_relations, 0, sizeof(physics_relations)); } @@ -130,6 +132,8 @@ IDNode *Depsgraph::add_id_node(ID *id, ID *id_cow_hint) * referencing to. */ BLI_ghash_insert(id_hash, id, id_node); id_nodes.push_back(id_node); + + id_type_exist[BKE_idcode_to_index(GS(id->name))] = 1; } return id_node; } |