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-03-31 18:07:44 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-03-31 18:08:18 +0300
commit6c42079b78743845c67dfc42682c6eed057a2242 (patch)
tree6215978da5ff389c7880643e3c98d243bdf14556
parent25ab3aac9d6f1be6e75d6bf9233770a649832384 (diff)
Depsgraph: Correction for the previous local view commit
Need to flush layers from components back to ID node.
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index ad73a2db826..cfc9005a1e3 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -349,15 +349,24 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
/* Special trick to get local view to work. */
LINKLIST_FOREACH (Base *, base, &scene->base) {
Object *object = base->object;
- DEG::IDDepsNode *node = graph->find_id_node(&object->id);
- node->layers = 0;
+ DEG::IDDepsNode *id_node = graph->find_id_node(&object->id);
+ id_node->layers = 0;
}
LINKLIST_FOREACH (Base *, base, &scene->base) {
Object *object = base->object;
- DEG::IDDepsNode *node = graph->find_id_node(&object->id);
- node->layers |= base->lay;
+ DEG::IDDepsNode *id_node = graph->find_id_node(&object->id);
+ id_node->layers |= base->lay;
}
DEG::deg_graph_build_flush_layers(graph);
+ LINKLIST_FOREACH (Base *, base, &scene->base) {
+ Object *object = base->object;
+ DEG::IDDepsNode *id_node = graph->find_id_node(&object->id);
+ GHASH_FOREACH_BEGIN(DEG::ComponentDepsNode *, comp, id_node->components)
+ {
+ id_node->layers |= comp->layers;
+ }
+ GHASH_FOREACH_END();
+ }
}
void DEG_on_visible_update(Main *bmain, const bool UNUSED(do_time))