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>2018-04-18 18:34:18 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-04-18 18:35:05 +0300
commit3c7254ffb65d4f1e07f0b5aaa52b392149226768 (patch)
treeedaf33db1142798bb8238ff5d01420393a9c58c2 /source/blender/depsgraph/intern/depsgraph_build.cc
parent4ec55350d4d863768d3cf435ede97ec76c79c5af (diff)
Depsgraph: Fix missing bases array update
view_layer_object_copy test was broken. This is a quick fix for now, can be optimized further later.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index c7f53b51374..f071fd04c5e 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -272,6 +272,19 @@ void DEG_graph_tag_relations_update(Depsgraph *graph)
{
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
deg_graph->need_update = true;
+ /* NOTE: When relations are updated, it's quite possible that
+ * we've got new bases in the scene. This means, we need to
+ * re-create flat array of bases in view layer.
+ *
+ * TODO(sergey): Try to make it so we don't flush updates
+ * to the whole depsgraph.
+ */
+ {
+ DEG::IDDepsNode *id_node = deg_graph->find_id_node(&deg_graph->scene->id);
+ if (id_node != NULL) {
+ id_node->tag_update(deg_graph);
+ }
+ }
}
/* Create or update relations in the specified graph. */