diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-20 17:58:53 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-20 17:58:53 +0400 |
commit | cb8f7fd385251d22ab97a48466e33ce0e42d5e4d (patch) | |
tree | fac9b9510d58bc04ff94dbc658621c3de31ed466 /source/blender/makesdna | |
parent | b8eec2b8fe123b118aef925ce2f786842764413d (diff) |
Auto Save
Auto save is now working again in 2.5. It will also remember now what
the location of the original file was when recovering it, so that
library links still work and saving the restored file does not save to
the temp directory. There is also a new Recover Auto Save operator
which will open the filebrowser in the temp directory and show the
auto saved .blends.
Implemenation Notes:
* Timer storage was moved from window to windowmanager, so we can have
windowmanager level timers too now, doesn't make sense to have
autosave timer attached to a particular window.
* FileGlobal now has a filename field storing where the file was saved.
Note that this is only used when loading a file through the recover
operators, regular file read doesn't use it, so copying the quit.blend
manually over the original file will still work as expected.
* Jobs timer no longer uses operator now, this seems more like an
internal thing, changing keymaps should not make it possible to break
the jobs manager.
* Autosave is postponed by 10 seconds when a modal operator is running,
e.g. transform or file browsing.
* Moved setting G.sce in setup_app_data before depsgraph updates, these
can use the filename for pointcaches.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_fileglobal_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h index 43ab895b398..271c8d2a33e 100644 --- a/source/blender/makesdna/DNA_fileglobal_types.h +++ b/source/blender/makesdna/DNA_fileglobal_types.h @@ -47,6 +47,9 @@ typedef struct FileGlobal { struct Scene *curscene; int fileflags; int globalf; + + /* file path where this was saved, for recover */ + char filename[240]; /* 240 = FILE_MAX */ } FileGlobal; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 7a024e35ff0..5cdd74c8262 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -124,6 +124,9 @@ typedef struct wmWindowManager { ListBase keyconfigs; /* known key configurations */ struct wmKeyConfig *defaultconf; /* default configuration, not saved */ int defaultactmap, pad2; /* active keymap from default for editing */ + + ListBase timers; /* active timers */ + struct wmTimer *autosavetimer; /* timer for auto save */ } wmWindowManager; /* wmWindowManager.initialized */ @@ -160,8 +163,6 @@ typedef struct wmWindow { int drawmethod, drawfail; /* internal for wm_draw.c only */ void *drawdata; /* internal for wm_draw.c only */ - ListBase timers; - ListBase queue; /* all events (ghost level events were handled) */ ListBase handlers; /* window+screen handlers, handled last */ ListBase modalhandlers; /* priority handlers, handled first */ |