From 230712e6cb8c5ff5c8ca2edc81b10ee036eed86a Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sat, 18 Apr 2015 15:50:29 +0200 Subject: Autosave: Flush edits only when saving global undo. This will stop freeing of PBVH in sculpt mode, which introduces some pretty severe freezes, especially in dyntopo. For global undo we flush the contents of the global undo buffer which does not include localized edits of sculpt/edit mode, so those data will not get saved anyway. --- source/blender/windowmanager/intern/wm_files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_files.c') diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index fdad108d44d..e80f789d3ab 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1137,8 +1137,6 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w } } - ED_editors_flush_edits(C, false); - wm_autosave_location(filepath); if (U.uiflag & USER_GLOBALUNDO) { @@ -1149,6 +1147,8 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w /* save as regular blend file */ int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_LOCK | G_FILE_SIGN | G_FILE_HISTORY); + ED_editors_flush_edits(C, false); + /* no error reporting to console */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL); } -- cgit v1.2.3