diff options
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index e3d061d8e4b..f0c584b6267 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2308,7 +2308,7 @@ static void write_scripts(WriteData *wd, ListBase *idbase) /* context is usually defined by WM, two cases where no WM is available: * - for forward compatibility, curscreen has to be saved * - for undofile, curscene needs to be saved */ -static void write_global(WriteData *wd, Main *mainvar) +static void write_global(WriteData *wd, int fileflags, Main *mainvar) { FileGlobal fg; bScreen *screen; @@ -2321,8 +2321,9 @@ static void write_global(WriteData *wd, Main *mainvar) fg.curscene= screen->scene; fg.displaymode= G.displaymode; fg.winpos= G.winpos; - fg.fileflags= (G.fileflags & ~G_FILE_NO_UI); // prevent to save this, is not good convention, and feature with concerns... + fg.fileflags= (fileflags & ~G_FILE_NO_UI); // prevent to save this, is not good convention, and feature with concerns... fg.globalf= G.f; + BLI_strncpy(fg.filename, mainvar->name, sizeof(fg.filename)); sprintf(subvstr, "%4d", BLENDER_SUBVERSION); memcpy(fg.subvstr, subvstr, 4); @@ -2351,7 +2352,7 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil mywrite(wd, buf, 12); write_renderinfo(wd, mainvar); - write_global(wd, mainvar); + write_global(wd, write_flags, mainvar); /* no UI save in undo */ if(current==NULL) { |