diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 14:25:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 14:34:50 +0300 |
commit | 905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch) | |
tree | 1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/blenloader | |
parent | 1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (diff) |
Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 7 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 152 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_260.c | 78 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 55 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 233 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 70 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_legacy.c | 100 |
7 files changed, 354 insertions, 341 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index eb787a16387..9822c794f3a 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8063,8 +8063,8 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, /* avoid conflicts with 2.8x branch */ { - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; ARegion *region; @@ -8073,7 +8073,8 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, v3d->ob_center = restore_pointer_by_name(id_map, (ID *)v3d->ob_center, USER_REAL); /* Free render engines for now. */ - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; for (region = regionbase->first; region; region = region->next) { if (region->regiontype == RGN_TYPE_WINDOW) { RegionView3D *rv3d = region->regiondata; 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) { diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index f1dcbba8e90..6f4dd88fcb6 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -769,10 +769,10 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) MovieClip *clip; 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; if (v3d->bundle_size == 0.0f) { @@ -1191,17 +1191,17 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) bScreen *sc; 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_CLIP) { SpaceClip *sclip = (SpaceClip *)sl; ARegion *region; bool hide = false; - for (region = sa->regionbase.first; region; region = region->next) { + for (region = area->regionbase.first; region; region = region->next) { if (region->regiontype == RGN_TYPE_PREVIEW) { if (region->alignment != RGN_ALIGN_NONE) { region->flag |= RGN_FLAG_HIDDEN; @@ -1371,12 +1371,12 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) bScreen *sc; 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_CLIP) { SpaceClip *sclip = (SpaceClip *)sl; @@ -1664,10 +1664,10 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) bScreen *sc; 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; if (v3d->render_border.xmin == 0.0f && v3d->render_border.ymin == 0.0f && @@ -1760,10 +1760,10 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) if (bmain->versionfile < 265 || (bmain->versionfile == 265 && bmain->subversionfile < 3)) { bScreen *sc; 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) { switch (sl->spacetype) { case SPACE_VIEW3D: { View3D *v3d = (View3D *)sl; @@ -1945,10 +1945,10 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) if (MAIN_VERSION_OLDER(bmain, 266, 2)) { bScreen *sc; 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; @@ -2119,10 +2119,10 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) bNodeInstanceKey active_viewer_key = {0}; /* simply pick the first node space and use that for the active viewer key */ for (screen = bmain->screens.first; screen; screen = screen->id.next) { - ScrArea *sa; - for (sa = screen->areabase.first; sa; sa = sa->next) { + ScrArea *area; + for (area = screen->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; bNodeTreePath *path = snode->treepath.last; @@ -2241,10 +2241,10 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) * We moved this check to the do versions to be sure the value makes any sense. */ 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; if (snode->zoom < 0.02f) { @@ -2258,22 +2258,22 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 268, 5)) { bScreen *sc; - ScrArea *sa; + ScrArea *area; /* add missing (+) expander in node editor */ for (sc = bmain->screens.first; sc; sc = sc->id.next) { - for (sa = sc->areabase.first; sa; sa = sa->next) { + for (area = sc->areabase.first; area; area = area->next) { ARegion *region, *arnew; - if (sa->spacetype == SPACE_NODE) { - region = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS); + if (area->spacetype == SPACE_NODE) { + region = BKE_area_find_region_type(area, RGN_TYPE_TOOLS); if (region) { continue; } /* add subdiv level; after header */ - region = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + region = BKE_area_find_region_type(area, RGN_TYPE_HEADER); /* is error! */ if (region == NULL) { @@ -2282,7 +2282,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) arnew = MEM_callocN(sizeof(ARegion), "node tools"); - BLI_insertlinkafter(&sa->regionbase, region, arnew); + BLI_insertlinkafter(&area->regionbase, region, arnew); arnew->regiontype = RGN_TYPE_TOOLS; arnew->alignment = RGN_ALIGN_LEFT; @@ -2339,14 +2339,14 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 269, 3)) { bScreen *sc; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; Scene *scene; /* Update files using invalid (outdated) outlinevis Outliner values. */ for (sc = bmain->screens.first; sc; sc = sc->id.next) { - for (sa = sc->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = sc->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_OUTLINER) { SpaceOutliner *so = (SpaceOutliner *)sl; @@ -2545,17 +2545,17 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) bScreen *sc; 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 *space_link; - for (space_link = sa->spacedata.first; space_link; space_link = space_link->next) { + for (space_link = area->spacedata.first; space_link; space_link = space_link->next) { if (space_link->spacetype == SPACE_IMAGE) { ARegion *region; ListBase *lb; - if (space_link == sa->spacedata.first) { - lb = &sa->regionbase; + if (space_link == area->spacedata.first) { + lb = &area->regionbase; } else { lb = &space_link->regionbase; diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 80f75a7ac4a..abe8326618b 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -522,13 +522,13 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) bScreen *sc; 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) { ARegion *region; - ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *lb = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase; for (region = lb->first; region; region = region->next) { BLI_listbase_clear(®ion->ui_previews); @@ -853,14 +853,14 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 273, 9)) { bScreen *scr; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; ARegion *region; /* Make sure sequencer preview area limits zoom */ for (scr = bmain->screens.first; scr; scr = scr->id.next) { - for (sa = scr->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = scr->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_SEQ) { for (region = sl->regionbase.first; region; region = region->next) { if (region->regiontype == RGN_TYPE_PREVIEW) { @@ -942,11 +942,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (screen = bmain->screens.first; screen; screen = screen->id.next) { - ScrArea *sa; - for (sa = screen->areabase.first; sa; sa = sa->next) { + ScrArea *area; + for (area = screen->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) { switch (sl->spacetype) { case SPACE_VIEW3D: { View3D *v3d = (View3D *)sl; @@ -996,12 +996,12 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find(fd->filesdna, "FileSelectParams", "int", "thumbnail_size")) { for (screen = bmain->screens.first; screen; screen = screen->id.next) { - ScrArea *sa; + ScrArea *area; - for (sa = screen->areabase.first; sa; sa = sa->next) { + for (area = screen->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_FILE) { SpaceFile *sfile = (SpaceFile *)sl; @@ -1064,13 +1064,13 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) bScreen *screen; #define RV3D_VIEW_PERSPORTHO 7 for (screen = bmain->screens.first; screen; screen = screen->id.next) { - ScrArea *sa; - for (sa = screen->areabase.first; sa; sa = sa->next) { + ScrArea *area; + for (area = screen->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) { ARegion *region; - ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *lb = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase; for (region = lb->first; region; region = region->next) { if (region->regiontype == RGN_TYPE_WINDOW) { if (region->regiondata) { @@ -1176,9 +1176,10 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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; + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + ListBase *regionbase = (sl == area->spacedata.first) ? &area->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; @@ -1243,9 +1244,9 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Adding "Properties" region to DopeSheet */ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { /* handle pushed-back space data first */ - for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_ACTION) { SpaceAction *saction = (SpaceAction *)sl; do_version_action_editor_properties_region(&saction->regionbase); @@ -1253,8 +1254,8 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } /* active spacedata info must be handled too... */ - if (sa->spacetype == SPACE_ACTION) { - do_version_action_editor_properties_region(&sa->regionbase); + if (area->spacetype == SPACE_ACTION) { + do_version_action_editor_properties_region(&area->regionbase); } } } @@ -1650,9 +1651,9 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 279, 4)) { /* Fix for invalid state of screen due to bug in older versions. */ for (bScreen *sc = bmain->screens.first; sc; sc = sc->id.next) { - for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) { - if (sa->full && sc->state == SCREENNORMAL) { - sa->full = NULL; + for (ScrArea *area = sc->areabase.first; area; area = area->next) { + if (area->full && sc->state == SCREENNORMAL) { + area->full = NULL; } } } diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index ac0c0c3da39..7449d1c04c1 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -116,10 +116,10 @@ static bScreen *screen_parent_find(const bScreen *screen) /* Can avoid lookup if screen state isn't maximized/full * (parent and child store the same state). */ if (ELEM(screen->state, SCREENMAXIMIZED, SCREENFULL)) { - for (const ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - if (sa->full && sa->full != screen) { - BLI_assert(sa->full->state == screen->state); - return sa->full; + for (const ScrArea *area = screen->areabase.first; area; area = area->next) { + if (area->full && area->full != screen) { + BLI_assert(area->full->state == screen->state); + return area->full; } } } @@ -649,13 +649,14 @@ static void do_versions_area_ensure_tool_region(Main *bmain, const short region_flag) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == space_type) { - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; - ARegion *region = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS); + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; + ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_TOOLS); if (!region) { - ARegion *header = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ARegion *header = BKE_area_find_region_type(area, RGN_TYPE_HEADER); region = do_versions_add_region(RGN_TYPE_TOOLS, "tools region"); BLI_insertlinkafter(regionbase, header, region); region->alignment = RGN_ALIGN_LEFT; @@ -1243,8 +1244,8 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports)) * so same layer as BKE_view_layer_default_view would return */ ViewLayer *layer = screen->scene->view_layers.first; - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (SpaceLink *space = sa->spacedata.first; space; space = space->next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *space = area->spacedata.first; space; space = space->next) { if (space->spacetype == SPACE_OUTLINER) { SpaceOutliner *soutliner = (SpaceOutliner *)space; @@ -1273,8 +1274,8 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports)) if (!MAIN_VERSION_ATLEAST(bmain, 280, 0)) { for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (SpaceLink *space = sa->spacedata.first; space; space = space->next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *space = area->spacedata.first; space; space = space->next) { if (space->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)space; if ((sima) && (sima->gpd)) { @@ -1928,13 +1929,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 280, 6)) { if (DNA_struct_elem_find(fd->filesdna, "SpaceOutliner", "int", "filter") == false) { bScreen *sc; - ScrArea *sa; + ScrArea *area; SpaceLink *sl; /* Update files using invalid (outdated) outlinevis Outliner values. */ for (sc = bmain->screens.first; sc; sc = sc->id.next) { - for (sa = sc->areabase.first; sa; sa = sa->next) { - for (sl = sa->spacedata.first; sl; sl = sl->next) { + for (area = sc->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_OUTLINER) { SpaceOutliner *so = (SpaceOutliner *)sl; @@ -1973,8 +1974,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *sc = bmain->screens.first; sc; sc = sc->id.next) { - for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) { - for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + for (ScrArea *area = sc->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.light = V3D_LIGHTING_STUDIO; @@ -2066,10 +2067,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 280, 12)) { /* Remove tool property regions. */ for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (ELEM(sl->spacetype, SPACE_VIEW3D, SPACE_CLIP)) { - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; for (ARegion *region = regionbase->first, *region_next; region; region = region_next) { region_next = region->next; @@ -2095,8 +2097,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Initialize new view3D options. */ for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.light = V3D_LIGHTING_STUDIO; @@ -2320,8 +2322,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_OUTLINER) { SpaceOutliner *soops = (SpaceOutliner *)sl; soops->filter_id_type = ID_GR; @@ -2402,8 +2404,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.flag |= V3D_SHADING_SPECULAR_HIGHLIGHT; @@ -2415,8 +2417,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "xray_alpha")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.xray_alpha = 0.5f; @@ -2430,8 +2432,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* when loading the internal file is loaded before the matcaps */ if (default_matcap) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; BLI_strncpy(v3d->shading.matcap, default_matcap->name, FILE_MAXFILE); @@ -2443,8 +2445,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "wireframe_threshold")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.wireframe_threshold = 0.5f; @@ -2455,8 +2457,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "cavity_valley_factor")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.cavity_valley_factor = 1.0f; @@ -2468,8 +2470,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "xray_alpha_bone")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.xray_alpha_bone = 0.5f; @@ -2494,8 +2496,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!DNA_struct_elem_find(fd->filesdna, "SpaceAction", "char", "mode_prev")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_ACTION) { SpaceAction *saction = (SpaceAction *)sl; /* "Dopesheet" should be default here, @@ -2510,8 +2512,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; if (v3d->drawtype == OB_TEXTURE) { @@ -2535,8 +2537,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find( fd->filesdna, "View3DOverlay", "float", "texture_paint_mode_opacity")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { enum { V3D_SHOW_MODE_SHADE_OVERRIDE = (1 << 15), @@ -2554,8 +2556,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "background_type")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; copy_v3_fl(v3d->shading.background_color, 0.05f); @@ -2619,8 +2621,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "short", "type")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; if (v3d->drawtype == OB_RENDER) { @@ -2642,8 +2644,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* initialize grease pencil view data */ if (!DNA_struct_elem_find(fd->filesdna, "SpaceView3D", "float", "vertex_opacity")) { for (bScreen *sc = bmain->screens.first; sc; sc = sc->id.next) { - for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) { - for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + for (ScrArea *area = sc->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->vertex_opacity = 1.0f; @@ -2674,8 +2676,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "gpencil_paper_opacity")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.gpencil_paper_opacity = 0.5f; @@ -2686,8 +2688,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "gpencil_grid_opacity")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.gpencil_grid_opacity = 0.5f; @@ -2824,8 +2826,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 280, 24)) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.edit_flag |= V3D_OVERLAY_EDIT_FACES | V3D_OVERLAY_EDIT_SEAMS | @@ -2870,8 +2872,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "xray_alpha_wire")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.flag |= V3D_SHADING_XRAY_WIREFRAME; @@ -2908,8 +2910,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 280, 29)) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { enum { V3D_OCCLUDE_WIRE = (1 << 14) }; View3D *v3d = (View3D *)sl; @@ -2931,9 +2933,10 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) */ if (!MAIN_VERSION_ATLEAST(bmain, 283, 1)) { for (bScreen *screen = bmain->screens.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; + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; ARegion *region_header = do_versions_find_region_or_null(regionbase, RGN_TYPE_HEADER); if (!region_header) { @@ -2954,10 +2957,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_PROPERTIES) { - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; ARegion *region = MEM_callocN(sizeof(ARegion), "navigation bar for properties"); ARegion *region_header = NULL; @@ -2981,8 +2985,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* grease pencil fade layer opacity */ if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "gpencil_fade_layer")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.gpencil_fade_layer = 0.5f; @@ -3215,8 +3219,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 280, 36)) { if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "curvature_ridge_factor")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.curvature_ridge_factor = 1.0f; @@ -3247,8 +3251,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Move studio_light selection to lookdev_light. */ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "lookdev_light[256]")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; memcpy(v3d->shading.lookdev_light, v3d->shading.studio_light, sizeof(char) * 256); @@ -3520,8 +3524,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Add wireframe color. */ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "wire_color_type")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.wire_color_type = V3D_SHADING_SINGLE_COLOR; @@ -3700,10 +3704,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 280, 55)) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_TEXT) { - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; /* Remove multiple footers that were added by mistake. */ do_versions_remove_regions_by_type(regionbase, RGN_TYPE_FOOTER); @@ -3740,8 +3745,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 280, 57)) { /* Enable Show Interpolation in dopesheet by default. */ for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_ACTION) { SpaceAction *saction = (SpaceAction *)sl; if ((saction->flag & SACTION_SHOW_EXTREMES) == 0) { @@ -3793,9 +3798,10 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Keep un-versioned until we're finished adding space types. */ { for (bScreen *screen = bmain->screens.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; + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; /* All spaces that use tools must be eventually added. */ ARegion *region = NULL; if (ELEM(sl->spacetype, SPACE_VIEW3D, SPACE_IMAGE, SPACE_SEQ) && @@ -3840,8 +3846,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find( fd->filesdna, "View3DOverlay", "float", "sculpt_mode_mask_opacity")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.sculpt_mode_mask_opacity = 0.75f; @@ -3904,10 +3910,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (ELEM(sl->spacetype, SPACE_CLIP, SPACE_GRAPH, SPACE_SEQ)) { - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; ARegion *region = NULL; if (sl->spacetype == SPACE_CLIP) { @@ -4056,10 +4063,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 281, 3)) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_TEXT) { - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; ARegion *region = do_versions_find_region_or_null(regionbase, RGN_TYPE_UI); if (region) { region->alignment = RGN_ALIGN_RIGHT; @@ -4110,8 +4118,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 281, 6)) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.flag |= V3D_SHADING_SCENE_LIGHTS_RENDER | V3D_SHADING_SCENE_WORLD_RENDER; @@ -4132,11 +4140,12 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 281, 9)) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_FILE) { SpaceFile *sfile = (SpaceFile *)sl; - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; ARegion *region_ui = do_versions_find_region(regionbase, RGN_TYPE_UI); ARegion *region_header = do_versions_find_region(regionbase, RGN_TYPE_HEADER); ARegion *region_toolprops = do_versions_find_region_or_null(regionbase, @@ -4188,8 +4197,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Added studiolight intensity */ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "studiolight_intensity")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.studiolight_intensity = 1.0f; @@ -4226,13 +4235,14 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; - for (ScrArea *sa_other = screen->areabase.first; sa_other; sa_other = sa_other->next) { - for (SpaceLink *sl_other = sa_other->spacedata.first; sl_other; + for (ScrArea *area_other = screen->areabase.first; area_other; + area_other = area_other->next) { + for (SpaceLink *sl_other = area_other->spacedata.first; sl_other; sl_other = sl_other->next) { if (sl != sl_other && sl_other->spacetype == SPACE_VIEW3D) { View3D *v3d_other = (View3D *)sl_other; @@ -4245,7 +4255,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } else if (sl->spacetype == SPACE_FILE) { - ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : + &sl->regionbase; ARegion *region_tools = do_versions_find_region_or_null(regionbase, RGN_TYPE_TOOLS); ARegion *region_header = do_versions_find_region(regionbase, RGN_TYPE_HEADER); @@ -4282,8 +4293,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) do_version_curvemapping_walker(bmain, do_version_curvemapping_flag_extend_extrapolate); for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - sa->flag &= ~AREA_FLAG_UNUSED_6; + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + area->flag &= ~AREA_FLAG_UNUSED_6; } } @@ -4353,8 +4364,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.render_pass = SCE_PASS_COMBINED; @@ -4428,8 +4439,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* UDIM Image Editor change. */ if (!DNA_struct_elem_find(fd->filesdna, "SpaceImage", "int", "tile_grid_shape[2]")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)sl; sima->tile_grid_shape[0] = 1; @@ -4503,8 +4514,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Add Lookdev blur property. */ if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "studiolight_blur")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->shading.studiolight_blur = 0.5f; @@ -4777,8 +4788,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!DNA_struct_elem_find( fd->filesdna, "View3DOverlay", "float", "sculpt_mode_face_sets_opacity")) { for (bScreen *screen = bmain->screens.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) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; v3d->overlay.sculpt_mode_face_sets_opacity = 1.0f; diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index 80395177100..aa19b3feefb 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -101,8 +101,8 @@ static void blo_update_defaults_screen(bScreen *screen, const char *workspace_name) { /* For all app templates. */ - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (ARegion *region = sa->regionbase.first; region; region = region->next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (ARegion *region = area->regionbase.first; region; region = region->next) { /* Some toolbars have been saved as initialized, * we don't want them to have odd zoom-level or scrolling set, see: T47047 */ if (ELEM(region->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS)) { @@ -111,7 +111,7 @@ static void blo_update_defaults_screen(bScreen *screen, } /* Set default folder. */ - for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_FILE) { SpaceFile *sfile = (SpaceFile *)sl; if (sfile->params) { @@ -130,8 +130,8 @@ static void blo_update_defaults_screen(bScreen *screen, return; } - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (ARegion *region = sa->regionbase.first; region; region = region->next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (ARegion *region = area->regionbase.first; region; region = region->next) { /* Remove all stored panels, we want to use defaults * (order, open/closed) as defined by UI code here! */ BKE_area_region_panels_free(®ion->panels); @@ -142,48 +142,48 @@ static void blo_update_defaults_screen(bScreen *screen, region->sizey = 0; } - if (sa->spacetype == SPACE_IMAGE) { + if (area->spacetype == SPACE_IMAGE) { if (STREQ(workspace_name, "UV Editing")) { - SpaceImage *sima = sa->spacedata.first; + SpaceImage *sima = area->spacedata.first; if (sima->mode == SI_MODE_VIEW) { sima->mode = SI_MODE_UV; } } } - else if (sa->spacetype == SPACE_ACTION) { + else if (area->spacetype == SPACE_ACTION) { /* Show markers region, hide channels and collapse summary in timelines. */ - SpaceAction *saction = sa->spacedata.first; + SpaceAction *saction = area->spacedata.first; saction->flag |= SACTION_SHOW_MARKERS; if (saction->mode == SACTCONT_TIMELINE) { saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED; - for (ARegion *region = sa->regionbase.first; region; region = region->next) { + for (ARegion *region = area->regionbase.first; region; region = region->next) { if (region->regiontype == RGN_TYPE_CHANNELS) { region->flag |= RGN_FLAG_HIDDEN; } } } } - else if (sa->spacetype == SPACE_GRAPH) { - SpaceGraph *sipo = sa->spacedata.first; + else if (area->spacetype == SPACE_GRAPH) { + SpaceGraph *sipo = area->spacedata.first; sipo->flag |= SIPO_SHOW_MARKERS; } - else if (sa->spacetype == SPACE_NLA) { - SpaceNla *snla = sa->spacedata.first; + else if (area->spacetype == SPACE_NLA) { + SpaceNla *snla = area->spacedata.first; snla->flag |= SNLA_SHOW_MARKERS; } - else if (sa->spacetype == SPACE_SEQ) { - SpaceSeq *seq = sa->spacedata.first; + else if (area->spacetype == SPACE_SEQ) { + SpaceSeq *seq = area->spacedata.first; seq->flag |= SEQ_SHOW_MARKERS; } - else if (sa->spacetype == SPACE_TEXT) { + else if (area->spacetype == SPACE_TEXT) { /* Show syntax and line numbers in Script workspace text editor. */ - SpaceText *stext = sa->spacedata.first; + SpaceText *stext = area->spacedata.first; stext->showsyntax = true; stext->showlinenrs = true; } - else if (sa->spacetype == SPACE_VIEW3D) { - View3D *v3d = sa->spacedata.first; + else if (area->spacetype == SPACE_VIEW3D) { + View3D *v3d = area->spacedata.first; /* Screen space cavity by default for faster performance. */ v3d->shading.cavity_type = V3D_SHADING_CAVITY_CURVATURE; v3d->shading.flag |= V3D_SHADING_SPECULAR_HIGHLIGHT; @@ -202,17 +202,17 @@ static void blo_update_defaults_screen(bScreen *screen, copy_v3_fl(v3d->shading.background_color, 0.05f); } } - else if (sa->spacetype == SPACE_CLIP) { - SpaceClip *sclip = sa->spacedata.first; + else if (area->spacetype == SPACE_CLIP) { + SpaceClip *sclip = area->spacedata.first; sclip->around = V3D_AROUND_CENTER_MEDIAN; } } /* Show tool-header by default (for most cases at least, hide for others). */ const bool hide_image_tool_header = STREQ(workspace_name, "Rendering"); - 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; + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase : &sl->regionbase; for (ARegion *region = regionbase->first; region; region = region->next) { if (region->regiontype == RGN_TYPE_TOOL_HEADER) { @@ -229,15 +229,15 @@ static void blo_update_defaults_screen(bScreen *screen, /* 2D animation template. */ if (app_template && STREQ(app_template, "2D_Animation")) { - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (ARegion *region = sa->regionbase.first; region; region = region->next) { - if (sa->spacetype == SPACE_ACTION) { - SpaceAction *saction = sa->spacedata.first; + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (ARegion *region = area->regionbase.first; region; region = region->next) { + if (area->spacetype == SPACE_ACTION) { + SpaceAction *saction = area->spacedata.first; /* Enable Sliders. */ saction->flag |= SACTION_SLIDERS; } - else if (sa->spacetype == SPACE_VIEW3D) { - View3D *v3d = sa->spacedata.first; + else if (area->spacetype == SPACE_VIEW3D) { + View3D *v3d = area->spacedata.first; /* Set Material Color by default. */ v3d->shading.color_type = V3D_SHADING_MATERIAL_COLOR; /* Enable Annotations. */ @@ -273,10 +273,10 @@ void BLO_update_defaults_workspace(WorkSpace *workspace, const char *app_templat for (WorkSpaceLayout *layout = layouts->first; layout; layout = layout->next) { bScreen *screen = layout->screen; if (screen) { - for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { - for (ARegion *region = sa->regionbase.first; region; region = region->next) { - if (sa->spacetype == SPACE_VIEW3D) { - View3D *v3d = sa->spacedata.first; + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (ARegion *region = area->regionbase.first; region; region = region->next) { + if (area->spacetype == SPACE_VIEW3D) { + View3D *v3d = area->spacedata.first; v3d->shading.flag &= ~V3D_SHADING_CAVITY; copy_v3_fl(v3d->shading.single_color, 1.0f); STRNCPY(v3d->shading.matcap, "basic_1"); diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 29c4a0f3c9d..a35ef80e4d3 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -582,9 +582,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* new variable: gridlines */ bScreen *sc = bmain->screens.first; while (sc) { - ScrArea *sa = sc->areabase.first; - while (sa) { - SpaceLink *sl = sa->spacedata.first; + ScrArea *area = sc->areabase.first; + while (area) { + SpaceLink *sl = area->spacedata.first; while (sl) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; @@ -595,7 +595,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } sl = sl->next; } - sa = sa->next; + area = area->next; } sc = sc->id.next; } @@ -696,9 +696,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile <= 169) { bScreen *sc = bmain->screens.first; while (sc) { - ScrArea *sa = sc->areabase.first; - while (sa) { - SpaceLink *sl = sa->spacedata.first; + ScrArea *area = sc->areabase.first; + while (area) { + SpaceLink *sl = area->spacedata.first; while (sl) { if (sl->spacetype == SPACE_GRAPH) { SpaceGraph *sipo = (SpaceGraph *)sl; @@ -706,7 +706,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } sl = sl->next; } - sa = sa->next; + area = area->next; } sc = sc->id.next; } @@ -729,9 +729,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile <= 171) { bScreen *sc = bmain->screens.first; while (sc) { - ScrArea *sa = sc->areabase.first; - while (sa) { - SpaceLink *sl = sa->spacedata.first; + ScrArea *area = sc->areabase.first; + while (area) { + SpaceLink *sl = area->spacedata.first; while (sl) { if (sl->spacetype == SPACE_TEXT) { SpaceText *st = (SpaceText *)sl; @@ -739,7 +739,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } sl = sl->next; } - sa = sa->next; + area = area->next; } sc = sc->id.next; } @@ -890,12 +890,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* some oldfile patch, moved from set_func_space */ 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_GRAPH) { SpaceSeq *sseq = (SpaceSeq *)sl; sseq->v2d.keeptot = 0; @@ -963,12 +963,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* patch for old wrong max view2d settings, allows zooming out more */ 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_ACTION) { SpaceAction *sac = (SpaceAction *)sl; sac->v2d.max[0] = 32000; @@ -1030,12 +1030,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* convert old mainb values for new button panels */ 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_PROPERTIES) { SpaceProperties *sbuts = (SpaceProperties *)sl; @@ -1100,12 +1100,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* new variable blockscale, for panels in any area */ 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) { /* added: 5x better zoom in for action */ if (sl->spacetype == SPACE_ACTION) { SpaceAction *sac = (SpaceAction *)sl; @@ -1122,9 +1122,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* new bit flags for showing/hiding grid floor and axes */ while (sc) { - ScrArea *sa = sc->areabase.first; - while (sa) { - SpaceLink *sl = sa->spacedata.first; + ScrArea *area = sc->areabase.first; + while (area) { + SpaceLink *sl = area->spacedata.first; while (sl) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; @@ -1138,7 +1138,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } sl = sl->next; } - sa = sa->next; + area = area->next; } sc = sc->id.next; } @@ -1185,10 +1185,10 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) * areas didn't initialize it to 0.7 yet */ 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) { /* added: 5x better zoom in for nla */ if (sl->spacetype == SPACE_NLA) { SpaceNla *snla = (SpaceNla *)sl; @@ -1203,10 +1203,10 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) bScreen *sc; 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->flag |= V3D_SELECT_OUTLINE; @@ -1220,10 +1220,10 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) bScreen *sc; 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_TEXT) { SpaceText *st = (SpaceText *)sl; if (st->tabnumber == 0) { @@ -1664,12 +1664,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) int a; for (sc = bmain->screens.first; sc; sc = sc->id.next) { - ScrArea *sa; - sa = sc->areabase.first; - while (sa) { + ScrArea *area; + 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_VIEW3D) { View3D *v3d = (View3D *)sl; if (v3d->gridsubdiv == 0) { @@ -1677,7 +1677,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } } - sa = sa->next; + area = area->next; } } @@ -1927,12 +1927,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile != 244 || bmain->subversionfile < 2) { /* correct older action editors - incorrect scrolling */ for (sc = bmain->screens.first; sc; sc = sc->id.next) { - ScrArea *sa; - sa = sc->areabase.first; - while (sa) { + ScrArea *area; + 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_ACTION) { SpaceAction *saction = (SpaceAction *)sl; @@ -1943,7 +1943,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) saction->v2d.cur.ymax = 5.0; } } - sa = sa->next; + area = area->next; } } } @@ -2544,12 +2544,12 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* adjust default settings for Animation Editors */ 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) { switch (sl->spacetype) { case SPACE_ACTION: { SpaceAction *sact = (SpaceAction *)sl; |