diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-30 14:57:30 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-30 15:07:22 +0300 |
commit | 8ed723745e1bf939ed59062256cf7808219d8748 (patch) | |
tree | e71ab7c9c775462e43e0a44df6449468fe74dba1 /source/blender | |
parent | 292125bfd35942ff12b1fe8e997e0417175e9947 (diff) |
Fix unnecessary Cycles render updates when selecting objects.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 10 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/nodes/deg_node_component.cc | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_engine.c | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 5 |
4 files changed, 11 insertions, 14 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 1792df6856d..b1645b0cb49 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -349,11 +349,11 @@ void deg_graph_id_tag_legacy_compat(Main *bmain, } } -void deg_graph_id_tag_update_single_flag(Main *bmain, - Depsgraph *graph, - ID *id, - IDDepsNode *id_node, - eDepsgraph_Tag tag) +static void deg_graph_id_tag_update_single_flag(Main *bmain, + Depsgraph *graph, + ID *id, + IDDepsNode *id_node, + eDepsgraph_Tag tag) { if (tag == DEG_TAG_EDITORS_UPDATE) { if (graph != NULL) { diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc index 786faa6e86c..699ee1a3cad 100644 --- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc +++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc @@ -383,7 +383,7 @@ DEG_COMPONENT_NODE_DEFINE(Bone, BONE, ID_RECALC_GEOME DEG_COMPONENT_NODE_DEFINE(Cache, CACHE, ID_RECALC); DEG_COMPONENT_NODE_DEFINE(CopyOnWrite, COPY_ON_WRITE, ID_RECALC_COPY_ON_WRITE); DEG_COMPONENT_NODE_DEFINE(Geometry, GEOMETRY, ID_RECALC_GEOMETRY); -DEG_COMPONENT_NODE_DEFINE(LayerCollections, LAYER_COLLECTIONS, ID_RECALC_COLLECTIONS); +DEG_COMPONENT_NODE_DEFINE(LayerCollections, LAYER_COLLECTIONS, 0); DEG_COMPONENT_NODE_DEFINE(Parameters, PARAMETERS, ID_RECALC); DEG_COMPONENT_NODE_DEFINE(Particles, EVAL_PARTICLES, ID_RECALC_GEOMETRY); DEG_COMPONENT_NODE_DEFINE(Proxy, PROXY, ID_RECALC_GEOMETRY); diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index dfeb91637ea..9bd240afe3a 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -374,20 +374,18 @@ static void eevee_view_update(void *vedata) static void eevee_id_object_update(void *UNUSED(vedata), Object *object) { /* This is a bit mask of components which update is to be ignored. */ - const int ignore_updates = ID_RECALC_COLLECTIONS; - const int allowed_updates = ~ignore_updates; EEVEE_LightProbeEngineData *ped = EEVEE_lightprobe_data_get(object); - if (ped != NULL && (ped->engine_data.recalc & allowed_updates) != 0) { + if (ped != NULL && ped->engine_data.recalc != 0) { ped->need_full_update = true; ped->engine_data.recalc = 0; } EEVEE_LampEngineData *led = EEVEE_lamp_data_get(object); - if (led != NULL && (led->engine_data.recalc & allowed_updates) != 0) { + if (led != NULL && led->engine_data.recalc != 0) { led->need_update = true; led->engine_data.recalc = 0; } EEVEE_ObjectEngineData *oedata = EEVEE_object_data_get(object); - if (oedata != NULL && (oedata->engine_data.recalc & allowed_updates) != 0) { + if (oedata != NULL && oedata->engine_data.recalc != 0) { oedata->need_update = true; oedata->engine_data.recalc = 0; } diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 4d59a7c9669..7af0939f454 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -491,9 +491,8 @@ enum { ID_RECALC_DRAW_CACHE = 1 << 3, ID_RECALC_GEOMETRY = 1 << 4, ID_RECALC_TRANSFORM = 1 << 5, - ID_RECALC_COLLECTIONS = 1 << 6, - ID_RECALC_COPY_ON_WRITE = 1 << 7, - ID_RECALC_TIME = 1 << 8, + ID_RECALC_COPY_ON_WRITE = 1 << 6, + ID_RECALC_TIME = 1 << 7, /* Special flag to check if SOMETHING was changed. */ ID_RECALC_ALL = (~(int)0), }; |