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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-10-29 20:52:32 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-29 20:54:38 +0300
commitbb770a2c85ffc76018aa28a4a941df1c6081530e (patch)
treed7c4ce904152d58a05e7da8ef633b4b8d9d97233 /source/blender/depsgraph
parent62e2bbd068dd689620063ccf9e75db71e9931056 (diff)
Depsgraph: use full operation key to preserve update tags on rebuild.
The key used by find_operation consists of the operation code, node name, and an index for array property drivers. All three elements are required to unambiguously look up a node.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc3
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.h1
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.cc3
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_operation.cc1
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_operation.h1
5 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index f929517f683..9ae32eeb7de 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -374,6 +374,7 @@ void DepsgraphNodeBuilder::begin_build()
entry_tag.component_type = comp_node->type;
entry_tag.opcode = op_node->opcode;
entry_tag.name = op_node->name;
+ entry_tag.name_tag = op_node->name_tag;
saved_entry_tags_.push_back(entry_tag);
};
GSET_FOREACH_END();
@@ -396,7 +397,7 @@ void DepsgraphNodeBuilder::end_build()
if (comp_node == NULL) {
continue;
}
- OperationDepsNode *op_node = comp_node->find_operation(entry_tag.opcode, entry_tag.name, -1);
+ OperationDepsNode *op_node = comp_node->find_operation(entry_tag.opcode, entry_tag.name, entry_tag.name_tag);
if (op_node == NULL) {
continue;
}
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index 1e4ef9718e0..47324968776 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@ -245,6 +245,7 @@ protected:
eDepsNode_Type component_type;
eDepsOperation_Code opcode;
const char *name;
+ int name_tag;
};
vector<SavedEntryTag> saved_entry_tags_;
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
index 9c7c8df1770..d6c3eb6157d 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
@@ -172,9 +172,9 @@ OperationDepsNode *ComponentDepsNode::find_operation(OperationIDKey key) const
node = (OperationDepsNode *)BLI_ghash_lookup(operations_map, &key);
}
else {
- BLI_assert(key.name_tag == -1);
foreach (OperationDepsNode *op_node, operations) {
if (op_node->opcode == key.opcode &&
+ op_node->name_tag == key.name_tag &&
STREQ(op_node->name, key.name))
{
node = op_node;
@@ -253,6 +253,7 @@ OperationDepsNode *ComponentDepsNode::add_operation(const DepsEvalOperationCb& o
op_node->evaluate = op;
op_node->opcode = opcode;
op_node->name = name;
+ op_node->name_tag = name_tag;
return op_node;
}
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_operation.cc b/source/blender/depsgraph/intern/nodes/deg_node_operation.cc
index e82bbbc0e8a..d9af3cbf2a4 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_operation.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_operation.cc
@@ -45,6 +45,7 @@ namespace DEG {
/* Inner Nodes */
OperationDepsNode::OperationDepsNode() :
+ name_tag(-1),
flag(0),
customdata_mask(0)
{
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_operation.h b/source/blender/depsgraph/intern/nodes/deg_node_operation.h
index c172f73be5f..7eeb99d984a 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_operation.h
@@ -80,6 +80,7 @@ struct OperationDepsNode : public DepsNode {
/* Identifier for the operation being performed. */
eDepsOperation_Code opcode;
+ int name_tag;
/* (eDepsOperation_Flag) extra settings affecting evaluation. */
int flag;