[Bf-blender-cvs] [db3c3d13381] blender2.8: Depsgraph: Fix/workaround crash with animation and drivers and CoW

Sergey Sharybin noreply at git.blender.org
Wed Apr 4 17:49:20 CEST 2018

Commit: db3c3d133817cd16ce3022ddce01559ed28cb532
Author: Sergey Sharybin
Date:   Wed Apr 4 17:28:23 2018 +0200
Branches: blender2.8

Depsgraph: Fix/workaround crash with animation and drivers and CoW

The issue was caused by component tag forcing CoW component to be run,
without actually flushing changes down the road from the CoW operation.

In a way, this is what we want: we do want CoW to run on changes, but
we don't want tiny change forcing full datablock update.

This commit makes it so order of updates is all correct, but the bigger
issue is still open: what parts of datablock CoW should be updating?

Now it's possible to open spring file and play around.


M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc


diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 96a99eea624..88c62182466 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2073,18 +2073,18 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node
 				graph_->add_new_relation(op_cow, op_node, "CoW Dependency");
 			else {
-				bool has_same_id_dependency = false;
+				bool has_same_comp_dependency = false;
 				foreach (DepsRelation *rel, op_node->inlinks) {
 					if (rel->from->type != DEG_NODE_TYPE_OPERATION) {
 					OperationDepsNode *op_node_from = (OperationDepsNode *)rel->from;
-					if (op_node_from->owner->owner == op_node->owner->owner) {
-						has_same_id_dependency = true;
+					if (op_node_from->owner == op_node->owner) {
+						has_same_comp_dependency = true;
-				if (!has_same_id_dependency) {
+				if (!has_same_comp_dependency) {
 					graph_->add_new_relation(op_cow, op_node, "CoW Dependency");

More information about the Bf-blender-cvs mailing list