[Bf-blender-cvs] [90b3dba5151] master: Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself
Sergey Sharybin
noreply at git.blender.org
Tue Aug 8 15:27:34 CEST 2017
Commit: 90b3dba5151d1297929ec08baf3800755e9e3494
Author: Sergey Sharybin
Date: Tue Aug 8 15:27:11 2017 +0200
Branches: master
https://developer.blender.org/rB90b3dba5151d1297929ec08baf3800755e9e3494
Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself
===================================================================
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 0726035b04e..bb8e2a710ef 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1091,6 +1091,13 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
}
else if (dtar->flag & DTAR_FLAG_STRUCT_REF) {
/* Get node associated with the object's transforms. */
+ if (dtar->id == id) {
+ /* Ignore input dependency if we're driving properties of
+ * the same ID, otherwise we'll be ending up in a cyclic
+ * dependency here.
+ */
+ continue;
+ }
OperationKey target_key(dtar->id,
DEG_NODE_TYPE_TRANSFORM,
DEG_OPCODE_TRANSFORM_FINAL);
More information about the Bf-blender-cvs
mailing list