diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2007-03-02 21:15:41 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2007-03-02 21:15:41 +0300 |
commit | cf75e5b78cf197ce24551db2d084be90adecfb78 (patch) | |
tree | 5d1dada0cb799cf45ffebe1e3bceff2e1da0d132 /source/blender/src/usiblender.c | |
parent | b2acdd69b037b8363dd2c214ccc0a2af691ab017 (diff) |
Interface:
Added option "Load Factory Settings" in the "File" menu.
With this, users don't have to remove .B.blend if they want to load the default data stored in Blender. Thanks Ton for ok'ing it and suggesting a better place in the menu (I had put it as "New (factory defaults)").
Diffstat (limited to 'source/blender/src/usiblender.c')
-rw-r--r-- | source/blender/src/usiblender.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 725d8742892..140e97d4028 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -470,7 +470,7 @@ static void outliner_242_patch(void) } /* only here settings for fullscreen */ -int BIF_read_homefile(void) +int BIF_read_homefile(int from_memory) { char tstr[FILE_MAXDIR+FILE_MAXFILE], scestr[FILE_MAXDIR]; char *home= BLI_gethome(); @@ -490,13 +490,13 @@ int BIF_read_homefile(void) BLI_freelistN(&G.ttfdata); G.relbase_valid = 0; - BLI_make_file_string(G.sce, tstr, home, ".B.blend"); + if (!from_memory) BLI_make_file_string(G.sce, tstr, home, ".B.blend"); strcpy(scestr, G.sce); /* temporal store */ /* prevent loading no UI */ G.fileflags &= ~G_FILE_NO_UI; - if (BLI_exists(tstr)) { + if (!from_memory && BLI_exists(tstr)) { success = BKE_read_file(tstr, NULL); } else { success = BKE_read_file_from_memory(datatoc_B_blend, datatoc_B_blend_size, NULL); @@ -858,7 +858,7 @@ void BIF_init(void) init_node_butfuncs(); BIF_preview_init_dbase(); - BIF_read_homefile(); + BIF_read_homefile(0); BIF_resources_init(); /* after homefile, to dynamically load an icon file based on theme settings */ |