diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_250.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 68e654a8cd5..83dc0e2ffe2 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -88,13 +88,13 @@ #define U (*((const UserDef *)&U)) /* 2.50 patch */ -static void area_add_header_region(ScrArea *sa, ListBase *lb) +static void area_add_header_region(ScrArea *area, ListBase *lb) { ARegion *region = MEM_callocN(sizeof(ARegion), "area region from do_versions"); BLI_addtail(lb, region); region->regiontype = RGN_TYPE_HEADER; - if (sa->headertype == 1) { + if (area->headertype == 1) { region->alignment = RGN_ALIGN_BOTTOM; } else { @@ -133,7 +133,7 @@ static void sequencer_init_preview_region(ARegion *region) region->v2d.keeptot = V2D_KEEPTOT_FREE; } -static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) +static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb) { ARegion *region; ARegion *region_main; @@ -256,7 +256,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) region = MEM_callocN(sizeof(ARegion), "area region from do_versions"); BLI_addtail(lb, region); - region->winrct = sa->totrct; + region->winrct = area->totrct; region->regiontype = RGN_TYPE_WINDOW; @@ -303,7 +303,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) SpaceNla *snla = (SpaceNla *)sl; memcpy(®ion->v2d, &snla->v2d, sizeof(View2D)); - region->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; + region->v2d.tot.ymin = (float)(-area->winy) / 3.0f; region->v2d.tot.ymax = 0.0f; region->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES); @@ -318,8 +318,8 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) /* We totally reinit the view for the Action Editor, * as some old instances had some weird cruft set. */ region->v2d.tot.xmin = -20.0f; - region->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; - region->v2d.tot.xmax = (float)((sa->winx > 120) ? (sa->winx) : 120); + region->v2d.tot.ymin = (float)(-area->winy) / 3.0f; + region->v2d.tot.xmax = (float)((area->winx > 120) ? (area->winx) : 120); region->v2d.tot.ymax = 0.0f; region->v2d.cur = region->v2d.tot; @@ -397,40 +397,40 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) static void do_versions_windowmanager_2_50(bScreen *screen) { - ScrArea *sa; + ScrArea *area; SpaceLink *sl; /* add regions */ - for (sa = screen->areabase.first; sa; sa = sa->next) { + for (area = screen->areabase.first; area; area = area->next) { /* we keep headertype variable to convert old files only */ - if (sa->headertype) { - area_add_header_region(sa, &sa->regionbase); + if (area->headertype) { + area_add_header_region(area, &area->regionbase); } - area_add_window_regions(sa, sa->spacedata.first, &sa->regionbase); + area_add_window_regions(area, area->spacedata.first, &area->regionbase); /* space imageselect is deprecated */ - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMASEL) { sl->spacetype = SPACE_EMPTY; /* spacedata then matches */ } } /* space sound is deprecated */ - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_SOUND) { sl->spacetype = SPACE_EMPTY; /* spacedata then matches */ } } /* pushed back spaces also need regions! */ - if (sa->spacedata.first) { - sl = sa->spacedata.first; + if (area->spacedata.first) { + sl = area->spacedata.first; for (sl = sl->next; sl; sl = sl->next) { - if (sa->headertype) { - area_add_header_region(sa, &sl->regionbase); + if (area->headertype) { + area_add_header_region(area, &sl->regionbase); } - area_add_window_regions(sa, sl, &sl->regionbase); + area_add_window_regions(area, sl, &sl->regionbase); } } } @@ -455,12 +455,12 @@ static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name) static void do_versions_gpencil_2_50(Main *main, bScreen *screen) { - ScrArea *sa; + ScrArea *area; SpaceLink *sl; /* add regions */ - for (sa = screen->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = screen->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; if (v3d->gpd) { @@ -1079,12 +1079,12 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) { bScreen *screen; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; for (screen = bmain->screens.first; screen; screen = screen->id.next) { - for (sa = screen->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = screen->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; if (v3d->drawtype == OB_MATERIAL) { @@ -1188,19 +1188,19 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile == 250 && bmain->subversionfile == 10) { /* fix for new view type in sequencer */ bScreen *screen; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; /* remove all preview window in wrong spaces */ for (screen = bmain->screens.first; screen; screen = screen->id.next) { - for (sa = screen->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = screen->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype != SPACE_SEQ) { ARegion *region; ListBase *regionbase; - if (sl == sa->spacedata.first) { - regionbase = &sa->regionbase; + if (sl == area->spacedata.first) { + regionbase = &area->regionbase; } else { regionbase = &sl->regionbase; @@ -1227,20 +1227,20 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) { /* fix for new view type in sequencer */ bScreen *screen; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; for (screen = bmain->screens.first; screen; screen = screen->id.next) { - for (sa = screen->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = screen->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_SEQ) { ARegion *region; ARegion *region_main; ListBase *regionbase; SpaceSeq *sseq = (SpaceSeq *)sl; - if (sl == sa->spacedata.first) { - regionbase = &sa->regionbase; + if (sl == area->spacedata.first) { + regionbase = &area->regionbase; } else { regionbase = &sl->regionbase; @@ -1360,17 +1360,17 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile < 250 || (bmain->versionfile == 250 && bmain->subversionfile < 14)) { /* fix for bad View2D extents for Animation Editors */ bScreen *screen; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; for (screen = bmain->screens.first; screen; screen = screen->id.next) { - for (sa = screen->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = screen->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { ListBase *regionbase; ARegion *region; - if (sl == sa->spacedata.first) { - regionbase = &sa->regionbase; + if (sl == area->spacedata.first) { + regionbase = &area->regionbase; } else { regionbase = &sl->regionbase; @@ -1380,7 +1380,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) for (region = (ARegion *)regionbase->first; region; region = region->next) { if (region->regiontype == RGN_TYPE_WINDOW) { region->v2d.cur.ymax = region->v2d.tot.ymax = 0.0f; - region->v2d.cur.ymin = region->v2d.tot.ymin = (float)(-sa->winy) / 3.0f; + region->v2d.cur.ymin = region->v2d.tot.ymin = (float)(-area->winy) / 3.0f; } } } @@ -1426,18 +1426,18 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* sequencer changes */ { bScreen *screen; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; for (screen = bmain->screens.first; screen; screen = screen->id.next) { - for (sa = screen->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = screen->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_SEQ) { ARegion *region_preview; ListBase *regionbase; - if (sl == sa->spacedata.first) { - regionbase = &sa->regionbase; + if (sl == area->spacedata.first) { + regionbase = &area->regionbase; } else { regionbase = &sl->regionbase; @@ -1467,10 +1467,10 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) * Here we clear it for old files so they don't come in with V3D_HIDE_OVERLAYS set, * which would cause cameras, lights, etc to become invisible */ for (sc = bmain->screens.first; sc; sc = sc->id.next) { - ScrArea *sa; - for (sa = sc->areabase.first; sa; sa = sa->next) { + ScrArea *area; + for (area = sc->areabase.first; area; area = area->next) { SpaceLink *sl; - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->flag2 &= ~V3D_HIDE_OVERLAYS; @@ -1551,12 +1551,12 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) /* Image editor scopes */ for (sc = bmain->screens.first; sc; sc = sc->id.next) { - ScrArea *sa; + ScrArea *area; - for (sa = sc->areabase.first; sa; sa = sa->next) { + for (area = sc->areabase.first; area; area = area->next) { SpaceLink *sl; - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)sl; BKE_scopes_new(&sima->scopes); @@ -1574,18 +1574,18 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) Brush *brush; for (sc = bmain->screens.first; sc; sc = sc->id.next) { - ScrArea *sa; - for (sa = sc->areabase.first; sa; sa = sa->next) { + ScrArea *area; + for (area = sc->areabase.first; area; area = area->next) { SpaceLink *sl; - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_NODE) { SpaceNode *snode = (SpaceNode *)sl; ListBase *regionbase; ARegion *region; - if (sl == sa->spacedata.first) { - regionbase = &sa->regionbase; + if (sl == area->spacedata.first) { + regionbase = &area->regionbase; } else { regionbase = &sl->regionbase; @@ -1851,17 +1851,17 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } for (sc = bmain->screens.first; sc; sc = sc->id.next) { - ScrArea *sa; - for (sa = sc->areabase.first; sa; sa = sa->next) { + ScrArea *area; + for (area = sc->areabase.first; area; area = area->next) { SpaceLink *sl; - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_INFO) { SpaceInfo *sinfo = (SpaceInfo *)sl; ARegion *region; sinfo->rpt_mask = INFO_RPT_OP; - for (region = sa->regionbase.first; region; region = region->next) { + for (region = area->regionbase.first; region; region = region->next) { if (region->regiontype == RGN_TYPE_WINDOW) { region->v2d.scroll = (V2D_SCROLL_RIGHT); region->v2d.align = V2D_ALIGN_NO_NEG_X | @@ -1897,15 +1897,15 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile < 256) { bScreen *sc; - ScrArea *sa; + ScrArea *area; Key *key; /* Fix for sample line scope initializing with no height */ for (sc = bmain->screens.first; sc; sc = sc->id.next) { - sa = sc->areabase.first; - while (sa) { + area = sc->areabase.first; + while (area) { SpaceLink *sl; - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)sl; if (sima->sample_line_hist.height == 0) { @@ -1913,7 +1913,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } } } - sa = sa->next; + area = area->next; } } @@ -2117,13 +2117,13 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) bScreen *screen; for (screen = bmain->screens.first; screen; screen = screen->id.next) { - ScrArea *sa; + ScrArea *area; /* add regions */ - for (sa = screen->areabase.first; sa; sa = sa->next) { - SpaceLink *sl = sa->spacedata.first; + for (area = screen->areabase.first; area; area = area->next) { + SpaceLink *sl = area->spacedata.first; if (sl->spacetype == SPACE_IMAGE) { ARegion *region; - for (region = sa->regionbase.first; region; region = region->next) { + for (region = area->regionbase.first; region; region = region->next) { if (region->regiontype == RGN_TYPE_WINDOW) { View2D *v2d = ®ion->v2d; v2d->minzoom = v2d->maxzoom = v2d->scroll = v2d->keeptot = v2d->keepzoom = @@ -2132,7 +2132,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } } - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { ARegion *region; for (region = sl->regionbase.first; region; region = region->next) { @@ -2174,14 +2174,14 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) { bScreen *screen; for (screen = bmain->screens.first; screen; screen = screen->id.next) { - ScrArea *sa; + ScrArea *area; /* add regions */ - for (sa = screen->areabase.first; sa; sa = sa->next) { - SpaceLink *sl = sa->spacedata.first; + for (area = screen->areabase.first; area; area = area->next) { + SpaceLink *sl = area->spacedata.first; if (sl->spacetype == SPACE_SEQ) { ARegion *region; - for (region = sa->regionbase.first; region; region = region->next) { + for (region = area->regionbase.first; region; region = region->next) { if (region->regiontype == RGN_TYPE_WINDOW) { if (region->v2d.min[1] == 4.0f) { region->v2d.min[1] = 0.5f; @@ -2189,7 +2189,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } } } - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_SEQ) { ARegion *region; for (region = sl->regionbase.first; region; region = region->next) { |