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.
This commit is contained in:
parent
7bce3dd3ad
commit
9adf4cba7d
Notes:
blender-bot
2023-02-14 09:00:21 +01:00
Referenced by issue #47966, Viewport render hair combed hair well but when render (F12) hair is broken Referenced by issue #47972, Blender crash Referenced by issue #45075, Error, region type 2 missing in - name:"File", id:5
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue