From b8302631865538eb967896455ea59b62f0f8711c Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Thu, 23 Jun 2022 11:44:29 +0200 Subject: Fix T98871: Drivers not updated when joining an armature If the some driver had been flagged as "invalid", the flag would not be cleared when joining armatures which could lead to now valid drivers still being flagged as invalid. Now we clear this invalid flag on all drivers to force a recheck after joining the armatures. --- source/blender/editors/armature/armature_relations.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/armature/armature_relations.c') diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 950178e865d..0825d6968c6 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -159,6 +159,11 @@ static void joined_armature_fix_animdata_cb(ID *id, FCurve *fcu, void *user_data ChannelDriver *driver = fcu->driver; DriverVar *dvar; + /* Ensure that invalid drivers gets re-evaluated in case they become valid once the join + * operation is finished. */ + fcu->flag &= ~FCURVE_DISABLED; + driver->flag &= ~DRIVER_FLAG_INVALID; + /* Fix driver references to invalid ID's */ for (dvar = driver->variables.first; dvar; dvar = dvar->next) { /* only change the used targets, since the others will need fixing manually anyway */ -- cgit v1.2.3