Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r--source/blender/blenkernel/intern/blender.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 4cbdbeb890d..fddff49f6c5 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -57,11 +57,11 @@
#include "BLI_blenlib.h"
#include "BLI_bpath.h"
#include "BLI_dynstr.h"
+#include "BLI_path_util.h"
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
#include "IMB_imbuf.h"
-#include "IMB_moviecache.h"
#include "BKE_blender.h"
#include "BKE_context.h"
@@ -112,7 +112,6 @@ void free_blender(void)
BLI_cb_finalize();
seq_stripelem_cache_destruct();
- IMB_moviecache_destruct();
free_nodesystem();
}
@@ -702,10 +701,18 @@ char *BKE_undo_menu_string(void)
/* saves quit.blend */
void BKE_undo_save_quit(void)
{
+ char str[FILE_MAXDIR+FILE_MAXFILE];
+
+ BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend");
+
+ BKE_undo_save(str);
+}
+
+void BKE_undo_save(char *fname)
+{
UndoElem *uel;
MemFileChunk *chunk;
int file;
- char str[FILE_MAXDIR+FILE_MAXFILE];
if( (U.uiflag & USER_GLOBALUNDO)==0) return;
@@ -718,9 +725,7 @@ void BKE_undo_save_quit(void)
/* no undo state to save */
if(undobase.first==undobase.last) return;
- BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend");
-
- file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
+ file = open(fname, O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
if(file == -1) {
//XXX error("Unable to save %s, check you have permissions", str);
return;
@@ -734,8 +739,8 @@ void BKE_undo_save_quit(void)
close(file);
- if(chunk) ; //XXX error("Unable to save %s, internal error", str);
- else printf("Saved session recovery to %s\n", str);
+ if(chunk) ; //XXX error("Unable to save %s, internal error", fname);
+ else printf("Saved session recovery to %s\n", fname);
}
/* sets curscene */