From d64ace779940977276c96170ec4d334379fb6450 Mon Sep 17 00:00:00 2001 From: Christoph Lendenfeld Date: Thu, 17 Jul 2025 14:22:16 +0200 Subject: [PATCH] Fix #142106: FCurve noise modifier versioning error This issue occurred because versioning was applied twice. The history: * First I created 05aac73b45 which fixed the issue on main (4.5 at the time), version `405, 14` * Then I created a backport for 4.4.3 f1e829a459 which also added versioning, version `404, 32` That means all files created with 4.4.3 (`404, 32`) already had versioning applied. However then opening it in 4.5 applied the versioning again since that only checked if the version was at least `405, 14` The fix is to exclude files that have already been saved with `404, 32` Pull Request: https://projects.blender.org/blender/blender/pulls/142208 --- source/blender/blenloader/intern/versioning_450.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/blenloader/intern/versioning_450.cc b/source/blender/blenloader/intern/versioning_450.cc index bd13a823620..c1375ae4d68 100644 --- a/source/blender/blenloader/intern/versioning_450.cc +++ b/source/blender/blenloader/intern/versioning_450.cc @@ -4147,7 +4147,11 @@ void do_versions_after_linking_450(FileData * /*fd*/, Main *bmain) } } - if (!MAIN_VERSION_FILE_ATLEAST(bmain, 405, 14)) { + /* Because this was backported to 4.4 (f1e829a459) we need to exclude anything that was already + * saved with that version otherwise we would apply the fix twice. */ + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 404, 32) || + (!MAIN_VERSION_FILE_ATLEAST(bmain, 405, 14) && bmain->versionfile >= 405)) + { LISTBASE_FOREACH (bAction *, dna_action, &bmain->actions) { blender::animrig::Action &action = dna_action->wrap(); blender::animrig::foreach_fcurve_in_action(