diff options
author | Ton Roosendaal <ton@blender.org> | 2012-10-30 21:36:00 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-10-30 21:36:00 +0400 |
commit | 21eb1735d63044e0964cf474f7b598ddc0b6495d (patch) | |
tree | e540e560143244298301a3f65babb2660c923622 /source/blender/blenloader | |
parent | ec1f69ffce508efe191b40566594532e564b51f7 (diff) |
Two fixes:
- Added versioning for reading old files with logic saved
- Added two more 'alt backspace' options, for copyright and registered trademark.
(also 'tm' but it's not in our default font)
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d694de61131..aaa529811d7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7137,6 +7137,29 @@ static void do_version_node_fix_internal_links_264(void *UNUSED(data), ID *UNUSE } } } + +static void do_version_logic_264(ListBase *regionbase) +{ + ARegion *ar; + + /* view settings for logic changed */ + for (ar = regionbase->first; ar; ar = ar->next) { + if(ar->regiontype == RGN_TYPE_WINDOW) { + if (ar->v2d.keeptot==0) { + ar->v2d.maxzoom = 1.5f; + + ar->v2d.keepzoom = V2D_KEEPZOOM | V2D_LIMITZOOM | V2D_KEEPASPECT; + ar->v2d.keeptot = V2D_KEEPTOT_BOUNDS; + ar->v2d.align = V2D_ALIGN_NO_POS_Y | V2D_ALIGN_NO_NEG_X; + ar->v2d.keepofs = V2D_KEEPOFS_Y; + } + } + } + + +} + + static void do_versions(FileData *fd, Library *lib, Main *main) { @@ -8246,15 +8269,24 @@ static void do_versions(FileData *fd, Library *lib, Main *main) do_version_node_fix_internal_links_264(NULL, NULL, ntree); } - - { - Object *ob; - for (ob = main->object.first; ob; ob = ob->id.next) { - if (ob->col_group == 0) { - ob->col_group = 0x01; - ob->col_mask = 0xff; + + if (main->versionfile < 264 || (main->versionfile == 264 && main->subversionfile < 6)) { + bScreen *sc; + + for (sc = main->screen.first; sc; sc = sc->id.next) { + ScrArea *sa; + for (sa = sc->areabase.first; sa; sa = sa->next) { + SpaceLink *sl; + if ( sa->spacetype == SPACE_LOGIC) + do_version_logic_264(&sa->regionbase); + + for (sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_LOGIC) + do_version_logic_264(&sl->regionbase); + } } } + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ |