diff options
author | Xavier Thomas <xavier.thomas.1980@gmail.com> | 2010-07-19 19:39:12 +0400 |
---|---|---|
committer | Xavier Thomas <xavier.thomas.1980@gmail.com> | 2010-07-19 19:39:12 +0400 |
commit | ff83a98a07c3d55eac03ebd903ad7a0c3e6c33b4 (patch) | |
tree | dfde0715052e82d7ff89f1af9ee3e2879aaf78e9 /source/blender/windowmanager/intern/wm_files.c | |
parent | f7298287b34f34c120788a456dfc43351467a3cc (diff) |
Add a "copy" option to the save_as_mainfile operator. It saves the current
state but does not make the saved file active, so further save won't use
this filepath.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 86e08118e54..6457e184066 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -566,7 +566,7 @@ int write_crash_blend(void) } } -int WM_write_file(bContext *C, char *target, int fileflags, ReportList *reports) +int WM_write_file(bContext *C, char *target, int fileflags, ReportList *reports, int copy) { Library *li; int len; @@ -620,11 +620,13 @@ int WM_write_file(bContext *C, char *target, int fileflags, ReportList *reports) do_history(di, reports); if (BLO_write_file(CTX_data_main(C), di, fileflags, reports, thumb)) { - strcpy(G.sce, di); - G.relbase_valid = 1; - strcpy(G.main->name, di); /* is guaranteed current file */ - - G.save_over = 1; /* disable untitled.blend convention */ + if(!copy) { + strcpy(G.sce, di); + G.relbase_valid = 1; + strcpy(G.main->name, di); /* is guaranteed current file */ + + G.save_over = 1; /* disable untitled.blend convention */ + } if(fileflags & G_FILE_COMPRESS) G.fileflags |= G_FILE_COMPRESS; else G.fileflags &= ~G_FILE_COMPRESS; |