[Bf-blender-cvs] [8ed723745e1] blender2.8: Fix unnecessary Cycles render updates when selecting objects.

Brecht Van Lommel noreply at git.blender.org
Wed May 30 14:16:52 CEST 2018


Commit: 8ed723745e1bf939ed59062256cf7808219d8748
Author: Brecht Van Lommel
Date:   Wed May 30 13:57:30 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB8ed723745e1bf939ed59062256cf7808219d8748

Fix unnecessary Cycles render updates when selecting objects.

===================================================================

M	source/blender/depsgraph/intern/depsgraph_tag.cc
M	source/blender/depsgraph/intern/nodes/deg_node_component.cc
M	source/blender/draw/engines/eevee/eevee_engine.c
M	source/blender/makesdna/DNA_ID.h

===================================================================

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),
 };



More information about the Bf-blender-cvs mailing list