From 6c42079b78743845c67dfc42682c6eed057a2242 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 31 Mar 2017 17:07:44 +0200 Subject: Depsgraph: Correction for the previous local view commit Need to flush layers from components back to ID node. --- source/blender/depsgraph/intern/depsgraph_tag.cc | 17 +++++++++++++---- 1 file 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)) -- cgit v1.2.3