[Bf-blender-cvs] [b8302631865] master: Fix T98871: Drivers not updated when joining an armature

Sebastian Parborg noreply at git.blender.org
Thu Jun 23 12:02:44 CEST 2022


Commit: b8302631865538eb967896455ea59b62f0f8711c
Author: Sebastian Parborg
Date:   Thu Jun 23 11:44:29 2022 +0200
Branches: master
https://developer.blender.org/rBb8302631865538eb967896455ea59b62f0f8711c

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.

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

M	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 */



More information about the Bf-blender-cvs mailing list