[Bf-blender-cvs] [079fc65e0a3] blender-v2.83-release: T76121 Driver depending on animated modifier property does not update

Sybren A. Stüvel noreply at git.blender.org
Mon May 4 15:30:05 CEST 2020


Commit: 079fc65e0a306ff4bfc7d03a121d164ab67d0cb3
Author: Sybren A. Stüvel
Date:   Mon May 4 13:43:15 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB079fc65e0a306ff4bfc7d03a121d164ab67d0cb3

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

===================================================================

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



More information about the Bf-blender-cvs mailing list