[Bf-blender-cvs] [b1d998ec5d8] blender-v2.79-release: Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself
Sergey Sharybin
noreply at git.blender.org
Thu Aug 17 14:45:40 CEST 2017
Commit: b1d998ec5d8fc5eb4bc28a917ba48de4e03cd56d
Author: Sergey Sharybin
Date: Tue Aug 8 15:27:11 2017 +0200
Branches: blender-v2.79-release
https://developer.blender.org/rBb1d998ec5d8fc5eb4bc28a917ba48de4e03cd56d
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 a1abcb96411..873102fda18 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1059,8 +1059,17 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
}
}
else if (dtar->flag & DTAR_FLAG_STRUCT_REF) {
- /* get node associated with the object's transforms */
- OperationKey target_key(dtar->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
+ /* 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);
add_relation(target_key, driver_key, "[Target -> Driver]");
}
else if (dtar->rna_path && strstr(dtar->rna_path, "pose.bones[")) {
More information about the Bf-blender-cvs
mailing list