[Bf-blender-cvs] [20d5fd36a19] temp-dynamic-overrides: Depsgraph: Link scene cow with object cow

Dalai Felinto noreply at git.blender.org
Fri Jun 15 13:34:34 CEST 2018


Commit: 20d5fd36a19838587730127fea2a7b926c51d50a
Author: Dalai Felinto
Date:   Fri Jun 15 12:57:18 2018 +0200
Branches: temp-dynamic-overrides
https://developer.blender.org/rB20d5fd36a19838587730127fea2a7b926c51d50a

Depsgraph: Link scene cow with object cow

For dynamic override we need to be sure the object cow is not updated before
the scene cow.

In fact we need this to any datablock that is potentially dynamic overridable.

That said this patch makes the relationship (fix the arrows) yet it doesn't
fix the underlying problem.

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

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 5312c7adac8..7d39d3ff656 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -524,6 +524,15 @@ void DepsgraphRelationBuilder::build_object(Base *base, Object *object)
 		             parent_transform_key,
 		             "ObLocal -> ObParent");
 	}
+	/* Handle dynamic override update. */
+	OperationKey scene_cow_key(&scene_->id,
+	                       DEG_NODE_TYPE_COPY_ON_WRITE,
+	                       DEG_OPCODE_COPY_ON_WRITE);
+	OperationKey ob_cow_key(&object->id,
+	                        DEG_NODE_TYPE_COPY_ON_WRITE,
+	                        DEG_OPCODE_COPY_ON_WRITE);
+	add_relation(scene_cow_key, ob_cow_key, "Dynamic Override CoW Relation");
+
 	/* Modifiers. */
 	if (object->modifiers.first != NULL) {
 		BuilderWalkUserData data;



More information about the Bf-blender-cvs mailing list