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>2017-08-08 16:27:11 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-08-08 16:27:25 +0300
commit90b3dba5151d1297929ec08baf3800755e9e3494 (patch)
treef4af7d02b7e65fe6cf8360e1c2ee8cc6a65064f1
parent126830b56cbb8e270c3bcffd14ee9d1ef2cecb0d (diff)
Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc7
1 files changed, 7 insertions, 0 deletions
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);