Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2022-06-23 12:44:29 +0300
committerSebastian Parborg <darkdefende@gmail.com>2022-06-23 12:47:37 +0300
commitb8302631865538eb967896455ea59b62f0f8711c (patch)
tree0e29c17d75401ca7904ad2482ab0a5f8e3f37bc9 /source/blender/editors/armature
parent091100bfd757b886527b465aef19a88ba261d7ec (diff)
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.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_relations.c5
1 files changed, 5 insertions, 0 deletions
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 */