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
This commit is contained in:
Sybren A. Stüvel 2020-05-04 13:43:15 +02:00
parent 000fdd8a6e
commit 079fc65e0a
1 changed files with 6 additions and 0 deletions

View File

@ -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)