Commit: 6c42079b78743845c67dfc42682c6eed057a2242
Author: Sergey Sharybin
Date:   Fri Mar 31 17:07:44 2017 +0200
Branches: master
https://developer.blender.org/rB6c42079b78743845c67dfc42682c6eed057a2242

Depsgraph: Correction for the previous local view commit

Need to flush layers from components back to ID node.

===================================================================

M       source/blender/depsgraph/intern/depsgraph_tag.cc

===================================================================

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))

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to