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>2018-05-31 13:54:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-31 19:07:55 +0300
commitd4daf9c00d36a2dc7073a0a0716fec1936b212da (patch)
tree6f05b0c651d19f912630bc7cd31d2c4c81297702
parentcd702db3382adae6aa30f3d163e77dd8328e71e3 (diff)
Depsgraph: Forbid update flush to go from copy-on-write to animation
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index a422de5b9a4..1833f19d4e5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2112,6 +2112,7 @@ void DepsgraphRelationBuilder::build_nested_shapekey(ID *owner, Key *key)
void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node)
{
ID *id_orig = id_node->id_orig;
+ ID_Type id_type = GS(id_orig->name);
TimeSourceKey time_source_key;
OperationKey copy_on_write_key(id_orig,
@@ -2135,12 +2136,18 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node
/* Component explicitly requests to not add relation. */
continue;
}
+ int rel_flag = 0;
+ if (comp_node->type == DEG_NODE_TYPE_ANIMATION && id_type != ID_AC) {
+ rel_flag |= DEPSREL_FLAG_NO_FLUSH;
+ }
/* All entry operations of each component should wait for a proper
* copy of ID.
*/
OperationDepsNode *op_entry = comp_node->get_entry_operation();
if (op_entry != NULL) {
- graph_->add_new_relation(op_cow, op_entry, "CoW Dependency");
+ DepsRelation *rel = graph_->add_new_relation(
+ op_cow, op_entry, "CoW Dependency");
+ rel->flag |= rel_flag;
}
/* All dangling operations should also be executed after copy-on-write. */
GHASH_FOREACH_BEGIN(OperationDepsNode *, op_node, comp_node->operations_map)
@@ -2149,22 +2156,27 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node
continue;
}
if (op_node->inlinks.size() == 0) {
- graph_->add_new_relation(op_cow, op_node, "CoW Dependency");
+ DepsRelation *rel = graph_->add_new_relation(
+ op_cow, op_node, "CoW Dependency");
+ rel->flag |= rel_flag;
}
else {
bool has_same_comp_dependency = false;
- foreach (DepsRelation *rel, op_node->inlinks) {
- if (rel->from->type != DEG_NODE_TYPE_OPERATION) {
+ foreach (DepsRelation *rel_current, op_node->inlinks) {
+ if (rel_current->from->type != DEG_NODE_TYPE_OPERATION) {
continue;
}
- OperationDepsNode *op_node_from = (OperationDepsNode *)rel->from;
+ OperationDepsNode *op_node_from =
+ (OperationDepsNode *)rel_current->from;
if (op_node_from->owner == op_node->owner) {
has_same_comp_dependency = true;
break;
}
}
if (!has_same_comp_dependency) {
- graph_->add_new_relation(op_cow, op_node, "CoW Dependency");
+ DepsRelation *rel = graph_->add_new_relation(
+ op_cow, op_node, "CoW Dependency");
+ rel->flag |= rel_flag;
}
}
}