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:
authorSybren A. Stüvel <sybren@blender.org>2020-05-04 14:43:15 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-05-04 16:29:19 +0300
commit079fc65e0a306ff4bfc7d03a121d164ab67d0cb3 (patch)
treea2ef12b6caf5731888d168c889674b2bb7a2b517 /source/blender/depsgraph
parent000fdd8a6eae1a774aa86778a32c187bd0eec2d1 (diff)
T76121 Driver depending on animated modifier property does not update
This fixes an issue where an animated modifier property that's used as variable in a driver wouldn't animate that driver's value. Building the relations for the driver target creates the relation `PARAMETERS_EVAL` → `DRIVER(variable)`. Building the relations for the FCurve targeting the modifier property creates the relation `ANIMATION_EXIT` → `GEOMETRY_EVAL_INIT`. This means that there is NOT a relation `ANIMATION_EXIT` → `PARAMETERS_EVAL`, and as a result, the driver is not properly updated when its variable reads animated data. This is resolved in this commit by adding the missing relation. Differential Revision: https://developer.blender.org/D7615
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc6
1 files changed, 6 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 4caea4b8aee..552546ff094 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1234,6 +1234,12 @@ void DepsgraphRelationBuilder::build_animdata(ID *id)
build_animdata_curves(id);
/* Drivers. */
build_animdata_drivers(id);
+
+ if (check_id_has_anim_component(id)) {
+ ComponentKey animation_key(id, NodeType::ANIMATION);
+ ComponentKey parameters_key(id, NodeType::PARAMETERS);
+ add_relation(animation_key, parameters_key, "Animation -> Parameters");
+ }
}
void DepsgraphRelationBuilder::build_animdata_curves(ID *id)