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>2016-05-30 13:32:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-30 13:35:03 +0300
commit673fabbb64092f8a3fd5bf87f4b3ce0e80760aa5 (patch)
tree333ef4f2a477735e19130337801bdc0b35868b09 /source/blender/depsgraph/intern/nodes
parent4aaf7b0c7a65473b4d1356fb36ba24eb2df4be49 (diff)
Depsgraph: Fix wrong layers flush form children to parent
It was possible to have issues in cases when several child dependencies goes to IDs with different layers. In this case order of flushing was not really well defined, which could lead to cases when indirect dependency via invisible object wouldn't work. Need some sort of barrier to prevent scheduling of parent nodes for until all children are done, but that's becoming quite nasty thing to implement. Added a temp field to component for now. maybe it's not so crazy actually and we might use it for evaluation as well, so we wouldn't flush updates to components which does not affect visible stuff.
Diffstat (limited to 'source/blender/depsgraph/intern/nodes')
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.cc8
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
index d18047c5112..c529e2ecfe6 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
@@ -86,7 +86,8 @@ static void comp_node_hash_value_free(void *value_v)
ComponentDepsNode::ComponentDepsNode() :
entry_operation(NULL),
exit_operation(NULL),
- flags(0)
+ flags(0),
+ layers(0)
{
operations_map = BLI_ghash_new(comp_node_hash_key,
comp_node_hash_key_cmp,
@@ -119,7 +120,10 @@ string ComponentDepsNode::identifier() const
char typebuf[7];
sprintf(typebuf, "(%d)", type);
- return string(typebuf) + name + " : " + idname;
+ char layers[7];
+ sprintf(layers, "%d", this->layers);
+
+ return string(typebuf) + name + " : " + idname + " (Layers: " + layers + ")";
}
OperationDepsNode *ComponentDepsNode::find_operation(OperationIDKey key) const
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.h b/source/blender/depsgraph/intern/nodes/deg_node_component.h
index 17e6e7e0030..df321ea9299 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.h
@@ -166,6 +166,9 @@ struct ComponentDepsNode : public DepsNode {
// XXX: a poll() callback to check if component's first node can be started?
int flags;
+
+ /* Temporary bitmask, used during graph construction. */
+ int layers;
};
/* ---------------------------------------- */