From bb98e83b99e63348e0396a5ffe5bb2a20ff1607a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 23 Jul 2018 17:38:41 +0200 Subject: Fix T55668: Volume Keyframe on Cut-ted Metastrip. We actually still had cases of Meta strip duplication resulting in non-unique strip names. Quiet surprising this went unoticed for so long. :( Fixed that bug, and think it was last one (at least, no other case of SEQ_DUPE_UNIQUE_NAME usage should be broken, I think...), and raised subversion and updated doversion to run uniquename check on strips on all previous fileversions. Note: will have to do that again when merging in 2.8... --- source/blender/blenloader/intern/versioning_270.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source/blender/blenloader/intern/versioning_270.c') diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 20f2a747fb2..7b787725084 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -308,6 +308,18 @@ static char *replace_bbone_easing_rnapath(char *old_path) } } +/* NOTE: this version patch is intended for versions < 2.52.2, but was initially introduced in 2.27 already. + * But in 2.79 another case generating non-unique names was discovered (see T55668, involving Meta strips)... */ +static void do_versions_seq_unique_name_all_strips(Scene *sce, ListBase *seqbasep) +{ + for (Sequence *seq = seqbasep->first; seq != NULL; seq = seq->next) { + BKE_sequence_base_unique_name_recursive(&sce->ed->seqbase, seq); + if (seq->seqbase.first != NULL) { + do_versions_seq_unique_name_all_strips(sce, &seq->seqbase); + } + } +} + static void do_version_bbone_easing_fcurve_fix(ID *UNUSED(id), FCurve *fcu, void *UNUSED(user_data)) { /* F-Curve's path (for bbone_in/out) */ @@ -1826,6 +1838,14 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + if (!MAIN_VERSION_ATLEAST(bmain, 279, 6)) { + for (Scene *sce = bmain->scene.first; sce != NULL; sce = sce->id.next) { + if (sce->ed != NULL && sce->ed->seqbase.first != NULL) { + do_versions_seq_unique_name_all_strips(sce, &sce->ed->seqbase); + } + } + } } void do_versions_after_linking_270(Main *bmain) -- cgit v1.2.3