[Bf-blender-cvs] [9adf4cb] master: Fix T45075: "Error, region type 2 missing in - name:"File", id:5"
Julian Eisel
noreply at git.blender.org
Sun Mar 27 13:45:18 CEST 2016
Commit: 9adf4cba7d978dcf84cfcdabdbbe7ad0ad19263b
Author: Julian Eisel
Date: Sun Mar 27 13:36:12 2016 +0200
Branches: master
https://developer.blender.org/rB9adf4cba7d978dcf84cfcdabdbbe7ad0ad19263b
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.
===================================================================
M 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 7d30ca8..b9191d5 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;
+ }
+ }
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list