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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-08-01 13:04:40 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-08-01 13:04:40 +0400
commit9811e847ca70cf277ef949c52918f24867fa0696 (patch)
tree319946570140a0e769d30c98dae60804d5495a09 /source/blender/windowmanager
parenta199ae5368fa4a1de36f62dbb214a051b3fbe0c3 (diff)
Fix #32209: Autosave ignores multires sculpting
Use a bit different fix, which gets active scene from context and uses this scene to figure out active object instead of itterating through all the objects.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index cb0f9c226b4..a90a1dfe43a 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -77,6 +77,7 @@
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
+#include "BKE_multires.h"
#include "BKE_packedFile.h"
#include "BKE_report.h"
#include "BKE_sound.h"
@@ -930,6 +931,7 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w
wmEventHandler *handler;
char filepath[FILE_MAX];
int fileflags;
+ Scene *scene = CTX_data_scene(C);
WM_event_remove_timer(wm, NULL, wm->autosavetimer);
@@ -942,7 +944,14 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w
}
}
}
-
+
+ if (scene) {
+ Object *ob = OBACT;
+
+ if (ob && ob->mode & OB_MODE_SCULPT)
+ multires_force_update(ob);
+ }
+
wm_autosave_location(filepath);
/* force save as regular blend file */