Commit: 6611b40746035571f9b04e10267bc7f2cc57f4e2
Author: Sergey Sharybin
Date:   Wed Dec 31 21:16:45 2014 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB6611b40746035571f9b04e10267bc7f2cc57f4e2

Depsgraph: Nodes visibility was flushing in the wrong direction

TODO: Moving objects around between layers should flush node layers.

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

M       source/blender/depsgraph/intern/depsgraph_build.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build.cpp 
b/source/blender/depsgraph/intern/depsgraph_build.cpp
index 91d77cb..25cc073 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build.cpp
@@ -468,15 +468,15 @@ static void deg_graph_flush_node_layers(Depsgraph *graph)
                else {
                        stack.pop();
                        IDDepsNode *id_node = node->owner->owner;
-                       for (OperationDepsNode::Relations::const_iterator 
it_rel = node->inlinks.begin();
-                            it_rel != node->inlinks.end();
+                       for (OperationDepsNode::Relations::const_iterator 
it_rel = node->outlinks.begin();
+                            it_rel != node->outlinks.end();
                             ++it_rel)
                        {
                                DepsRelation *rel = *it_rel;
-                               if (rel->from->type == DEPSNODE_TYPE_OPERATION) 
{
-                                       OperationDepsNode *from = 
(OperationDepsNode *)rel->from;
-                                       IDDepsNode *id_from = 
from->owner->owner;
-                                       id_node->layers |= id_from->layers;
+                               if (rel->to->type == DEPSNODE_TYPE_OPERATION) {
+                                       OperationDepsNode *to = 
(OperationDepsNode *)rel->to;
+                                       IDDepsNode *id_to = to->owner->owner;
+                                       id_node->layers |= id_to->layers;
                                }
                        }
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to