From 21eb1735d63044e0964cf474f7b598ddc0b6495d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 30 Oct 2012 17:36:00 +0000 Subject: [PATCH] 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) --- source/blender/blenloader/intern/readfile.c | 46 +++++++++++++++++---- source/blender/editors/curve/editfont.c | 11 ++++- 2 files changed, 49 insertions(+), 8 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! */ diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 9cab739317c..d92c20a1265 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -94,7 +94,8 @@ static char findaccent(char char1, unsigned int code) } else if (char1 == 'c') { if (code == ',') new = 231; - if (code == '|') new = 162; + else if (code == '|') new = 162; + else if (code == 'o') new = 169; } else if (char1 == 'e') { if (code == '`') new = 232; @@ -120,10 +121,18 @@ static char findaccent(char char1, unsigned int code) else if (code == '/') new = 248; else if (code == '-') new = 186; else if (code == 'e') new = 143; + else if (code == 'c') new = 169; + else if (code == 'r') new = 174; + } + else if (char1 == 'r') { + if (code == 'o') new = 174; } else if (char1 == 's') { if (code == 's') new = 167; } + else if (char1 == 't') { + if (code == 'm') new = 153; + } else if (char1 == 'u') { if (code == '`') new = 249; else if (code == 39) new = 250;