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>2017-10-24 16:14:22 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-10-24 17:04:11 +0300
commit72b61763da593fb6a9822f3e37eff9dd2973bf66 (patch)
treefbcc7169990e75410d5eabd132dedb003e635eff /source/blender/depsgraph/intern/depsgraph_tag.cc
parent4dbfb130db1afea2ec4f8d5604515e81e5fde687 (diff)
Depsgraph: Begin bringing API to pass explicit graph
This is a first step towards an updated API where we pass explicit graph rather than a scene. This is because we can no longer deduct which graph to use since it will depend on a context. Will happen in several steps, so bisecting will not be such a pain.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 19d3dda1896..cde87ba126c 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -361,7 +361,7 @@ void deg_id_tag_update(Main *bmain, ID *id, int flag)
}
}
-void deg_graph_on_visible_update(Main *bmain, Scene *scene, Depsgraph *graph)
+void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph)
{
/* Make sure objects are up to date. */
GHASH_FOREACH_BEGIN(DEG::IDDepsNode *, id_node, graph->id_hash)
@@ -389,7 +389,7 @@ void deg_graph_on_visible_update(Main *bmain, Scene *scene, Depsgraph *graph)
}
GHASH_FOREACH_END();
/* Make sure collection properties are up to date. */
- IDDepsNode *scene_id_node = graph->find_id_node(&scene->id);
+ IDDepsNode *scene_id_node = graph->find_id_node(&graph->scene->id);
BLI_assert(scene_id_node != NULL);
scene_id_node->tag_update(graph);
}
@@ -436,16 +436,14 @@ void DEG_scene_flush_update(Main *bmain, Scene *scene)
if (scene->depsgraph_legacy == NULL) {
return;
}
- DEG::deg_graph_flush_updates(
- bmain,
- reinterpret_cast<DEG::Depsgraph *>(scene->depsgraph_legacy));
+ DEG::deg_graph_flush_updates(bmain, (DEG::Depsgraph *)scene->depsgraph_legacy);
}
/* Update dependency graph when visible scenes/layers changes. */
-void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
+void DEG_graph_on_visible_update(Main *bmain, Depsgraph *depsgraph)
{
- DEG::Depsgraph *graph = (DEG::Depsgraph *)scene->depsgraph_legacy;
- DEG::deg_graph_on_visible_update(bmain, scene, graph);
+ DEG::Depsgraph *graph = (DEG::Depsgraph *)depsgraph;
+ DEG::deg_graph_on_visible_update(bmain, graph);
}
void DEG_on_visible_update(Main *bmain, const bool UNUSED(do_time))
@@ -455,7 +453,7 @@ void DEG_on_visible_update(Main *bmain, const bool UNUSED(do_time))
scene = (Scene *)scene->id.next)
{
if (scene->depsgraph_legacy != NULL) {
- DEG_graph_on_visible_update(bmain, scene);
+ DEG_graph_on_visible_update(bmain, scene->depsgraph_legacy);
}
}
}