diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-03-27 14:36:12 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-03-27 14:45:10 +0300 |
commit | 9adf4cba7d978dcf84cfcdabdbbe7ad0ad19263b (patch) | |
tree | e792130ce56616ef372e7a4748e2475efe8851eb /source/blender/blenloader | |
parent | 7bce3dd3ad02941412919f2d5b9ab89c67f2cbb9 (diff) |
Fix T45075: "Error, region type 2 missing in - name:"File", id:5"
Unexpectedly found out what was going wrong here. If a file was saved with a filebrowser open, we searched for the channel region in the wrong list (see 'ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;').
Minor annoyance is that I had to move the loookup to the 2.77.1 version patch now.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 46 |
1 files changed, 14 insertions, 32 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 7d30ca89822..b9191d545ed 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -584,34 +584,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } - if (!MAIN_VERSION_ATLEAST(main, 273, 7)) { - bScreen *scr; - ScrArea *sa; - SpaceLink *sl; - ARegion *ar; - - for (scr = main->screen.first; scr; scr = scr->id.next) { - /* Remove old deprecated region from filebrowsers */ - for (sa = scr->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { - if (sl->spacetype == SPACE_FILE) { - for (ar = sl->regionbase.first; ar; ar = ar->next) { - if (ar->regiontype == RGN_TYPE_CHANNELS) { - break; - } - } - - if (ar) { - /* Free old deprecated 'channel' region... */ - BKE_area_region_free(NULL, ar); - BLI_freelinkN(&sl->regionbase, ar); - } - } - } - } - } - } - if (!MAIN_VERSION_ATLEAST(main, 273, 8)) { Object *ob; for (ob = main->object.first; ob != NULL; ob = ob->id.next) { @@ -1068,16 +1040,15 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } - /* Bug: Was possible to add preview region to sequencer view by using AZones. - * Caused by redundant preview region stored into startup.blend */ for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) { for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + /* Bug: Was possible to add preview region to sequencer view by using AZones. */ if (sl->spacetype == SPACE_SEQ) { SpaceSeq *sseq = (SpaceSeq *)sl; if (sseq->view == SEQ_VIEW_SEQUENCE) { - ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; - for (ARegion *ar = lb->first; ar; ar = ar->next) { + for (ARegion *ar = regionbase->first; ar; ar = ar->next) { /* remove preview region for sequencer-only view! */ if (ar->regiontype == RGN_TYPE_PREVIEW) { ar->flag |= RGN_FLAG_HIDDEN; @@ -1087,6 +1058,17 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + /* Remove old deprecated region from filebrowsers */ + else if (sl->spacetype == SPACE_FILE) { + for (ARegion *ar = regionbase->first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_CHANNELS) { + /* Free old deprecated 'channel' region... */ + BKE_area_region_free(NULL, ar); + BLI_freelinkN(regionbase, ar); + break; + } + } + } } } } |