Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-08-25 16:51:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-08-25 16:51:19 +0300
commit84be763be299572eb98a7fbf3b87c27408c57984 (patch)
treee5085ee4622bd7732c09607ed631713e7e636b5c
parenteb2cfc3a25513a7234e407978c7db984d7646351 (diff)
Depsgraph: Merge some traversal back on
After previous commit there is no longer measurable difference in speed and doing all stuff in one go is preferrable here anyway.
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc82
1 files changed, 36 insertions, 46 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 98d8c60f012..a7418ac2c11 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -136,6 +136,42 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
ComponentDepsNode *comp_node = node->owner;
IDDepsNode *id_node = comp_node->owner;
+
+ ID *id = id_node->id;
+ if(id_node->done == 0) {
+ deg_editors_id_update(bmain, id);
+ lib_id_recalc_tag(bmain, id);
+ /* TODO(sergey): For until we've got proper data nodes in the graph. */
+ lib_id_recalc_data_tag(bmain, id);
+ }
+
+ if(comp_node->done == 0) {
+ Object *object = NULL;
+ if (GS(id->name) == ID_OB) {
+ object = (Object *)id;
+ }
+ foreach (OperationDepsNode *op, comp_node->operations) {
+ op->flag |= DEPSOP_FLAG_NEEDS_UPDATE;
+ }
+ if (object != NULL) {
+ /* This code is used to preserve those areas which does
+ * direct object update,
+ *
+ * Plus it ensures visibility changes and relations and
+ * layers visibility update has proper flags to work with.
+ */
+ if (comp_node->type == DEPSNODE_TYPE_ANIMATION) {
+ object->recalc |= OB_RECALC_TIME;
+ }
+ else if (comp_node->type == DEPSNODE_TYPE_TRANSFORM) {
+ object->recalc |= OB_RECALC_OB;
+ }
+ else {
+ object->recalc |= OB_RECALC_DATA;
+ }
+ }
+ }
+
id_node->done = 1;
comp_node->done = 1;
@@ -162,52 +198,6 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
}
}
}
-
- GHASH_FOREACH_BEGIN(DEG::IDDepsNode *, id_node, graph->id_hash)
- {
- if (id_node->done == 1) {
- ID *id = id_node->id;
- Object *object = NULL;
-
- if (GS(id->name) == ID_OB) {
- object = (Object *)id;
- }
-
- deg_editors_id_update(bmain, id_node->id);
-
- lib_id_recalc_tag(bmain, id_node->id);
- /* TODO(sergey): For until we've got proper data nodes in the graph. */
- lib_id_recalc_data_tag(bmain, id_node->id);
-
- GHASH_FOREACH_BEGIN(const ComponentDepsNode *, comp_node, id_node->components)
- {
- if (comp_node->done) {
- foreach (OperationDepsNode *op, comp_node->operations) {
- op->flag |= DEPSOP_FLAG_NEEDS_UPDATE;
- }
- if (object != NULL) {
- /* This code is used to preserve those areas which does
- * direct object update,
- *
- * Plus it ensures visibility changes and relations and
- * layers visibility update has proper flags to work with.
- */
- if (comp_node->type == DEPSNODE_TYPE_ANIMATION) {
- object->recalc |= OB_RECALC_TIME;
- }
- else if (comp_node->type == DEPSNODE_TYPE_TRANSFORM) {
- object->recalc |= OB_RECALC_OB;
- }
- else {
- object->recalc |= OB_RECALC_DATA;
- }
- }
- }
- }
- GHASH_FOREACH_END();
- }
- }
- GHASH_FOREACH_END();
}
static void graph_clear_func(void *data_v, int i)