From 079fc65e0a306ff4bfc7d03a121d164ab67d0cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 4 May 2020 13:43:15 +0200 Subject: T76121 Driver depending on animated modifier property does not update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/depsgraph') 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) -- cgit v1.2.3