diff options
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 11 | ||||
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 8 |
3 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index ccd3e0bfd6c..1dd7fcf1d1a 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -63,6 +63,8 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" +#include "BLO_readfile.h" + #include "BLT_translation.h" #include "BKE_action.h" @@ -993,8 +995,13 @@ static void link_recurs_seq(BlendDataReader *reader, ListBase *lb) { BLO_read_list(reader, lb); - LISTBASE_FOREACH (Sequence *, seq, lb) { - if (seq->seqbase.first) { + LISTBASE_FOREACH_MUTABLE (Sequence *, seq, lb) { + /* Sanity check. */ + if ((seq->machine < 1) || (seq->machine > MAXSEQ)) { + BLI_freelinkN(lb, seq); + BLO_read_data_reports(reader)->count.vse_strips_skipped++; + } + else if (seq->seqbase.first) { link_recurs_seq(reader, &seq->seqbase); } } diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 9093c6fd85b..c6637b17d47 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -121,6 +121,8 @@ typedef struct BlendFileReadReport { int proxies_to_lib_overrides_success; /* Number of proxies that failed to convert to library overrides. */ int proxies_to_lib_overrides_failures; + /* Number of VSE strips that were not read because were in non-supported channels. */ + int vse_strips_skipped; } count; /* Number of libraries which had overrides that needed to be resynced, and a single linked list diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index bbab3a8b326..a5ebf988edd 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -871,6 +871,14 @@ static void file_read_reports_finalize(BlendFileReadReport *bf_reports) bf_reports->count.linked_proxies); } + if (bf_reports->count.vse_strips_skipped != 0) { + BKE_reportf(bf_reports->reports, + RPT_ERROR, + "%d sequence strips were not read because they were in a channel larger than %d", + bf_reports->count.vse_strips_skipped, + MAXSEQ); + } + BLI_linklist_free(bf_reports->resynced_lib_overrides_libraries, NULL); bf_reports->resynced_lib_overrides_libraries = NULL; } |