[Bf-blender-cvs] [1ada323] master: Depsgraph: Report number of objects to which update as flished

Sergey Sharybin noreply at git.blender.org
Fri Aug 26 14:05:45 CEST 2016


Commit: 1ada3231ecf4a16c14ceedf46ff10d0478929e23
Author: Sergey Sharybin
Date:   Fri Aug 26 14:04:03 2016 +0200
Branches: master
https://developer.blender.org/rB1ada3231ecf4a16c14ceedf46ff10d0478929e23

Depsgraph: Report number of objects to which update as flished

This is an easiest way in the new depsgraph to get an idea how much objects
were handled on update.

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

M	source/blender/depsgraph/intern/eval/deg_eval_flush.cc

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

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index a7418ac..7c6c25b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -127,6 +127,7 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
 	}
 	GSET_FOREACH_END();
 
+	int num_flushed_objects = 0;
 	while (!queue.empty()) {
 		OperationDepsNode *node = queue.front();
 		queue.pop_front();
@@ -149,6 +150,9 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
 				Object *object = NULL;
 				if (GS(id->name) == ID_OB) {
 					object = (Object *)id;
+					if(id_node->done == 0) {
+						++num_flushed_objects;
+					}
 				}
 				foreach (OperationDepsNode *op, comp_node->operations) {
 					op->flag |= DEPSOP_FLAG_NEEDS_UPDATE;
@@ -198,6 +202,7 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
 			}
 		}
 	}
+	DEG_DEBUG_PRINTF("Update flushed to %d objects\n", num_flushed_objects);
 }
 
 static void graph_clear_func(void *data_v, int i)




More information about the Bf-blender-cvs mailing list