diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 00710e67cf2..f4575c3b1e3 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -174,6 +174,10 @@ typedef struct { MemFile *compare, *current; int tot, count, error, memsize; + +#ifdef USE_MESH_FORWARDS_COMAT + char use_mesh_compat; /* option to save with older mesh format */ +#endif } WriteData; static WriteData *writedata_new(int file) @@ -2574,7 +2578,10 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar) fg.curscene= screen->scene; fg.displaymode= G.displaymode; fg.winpos= G.winpos; - fg.fileflags= (fileflags & ~(G_FILE_NO_UI|G_FILE_RELATIVE_REMAP)); // prevent to save this, is not good convention, and feature with concerns... + + /* prevent to save this, is not good convention, and feature with concerns... */ + fg.fileflags= (fileflags & ~(G_FILE_NO_UI|G_FILE_RELATIVE_REMAP|G_FILE_MESH_COMPAT)); + fg.globalf= G.f; BLI_strncpy(fg.filename, mainvar->name, sizeof(fg.filename)); @@ -2617,7 +2624,11 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil blo_split_main(&mainlist, mainvar); wd= bgnwrite(handle, compare, current); - + +#ifdef USE_MESH_FORWARDS_COMAT + wd->use_mesh_compat = (write_flags & G_FILE_MESH_COMPAT) != 0; +#endif + sprintf(buf, "BLENDER%c%c%.3d", (sizeof(void*)==8)?'-':'_', (ENDIAN_ORDER==B_ENDIAN)?'V':'v', BLENDER_VERSION); mywrite(wd, buf, 12); |