Fix T37967: autosave does not save dynamic topology edits while in sculpt mode.

This commit is contained in:
Brecht Van Lommel
2014-01-20 14:19:49 +01:00
parent 018fe81779
commit fbf821c50b
4 changed files with 3 additions and 11 deletions

View File

@@ -46,7 +46,7 @@ struct Mesh;
void ED_editors_init(struct bContext *C); void ED_editors_init(struct bContext *C);
void ED_editors_exit(struct bContext *C); void ED_editors_exit(struct bContext *C);
void ED_editors_flush_edits(struct bContext *C, bool for_render); void ED_editors_flush_edits(const struct bContext *C, bool for_render);
/* ************** Undo ************************ */ /* ************** Undo ************************ */

View File

@@ -739,7 +739,6 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
View3D *v3d = use_viewport ? CTX_wm_view3d(C) : NULL; View3D *v3d = use_viewport ? CTX_wm_view3d(C) : NULL;
struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : NULL; struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : NULL;
const char *name; const char *name;
Object *active_object = CTX_data_active_object(C);
ScrArea *sa; ScrArea *sa;
/* only one render job at a time */ /* only one render job at a time */

View File

@@ -143,7 +143,7 @@ void ED_editors_exit(bContext *C)
/* flush any temp data from object editing to DNA before writing files, /* flush any temp data from object editing to DNA before writing files,
* rendering, copying, etc. */ * rendering, copying, etc. */
void ED_editors_flush_edits(bContext *C, bool for_render) void ED_editors_flush_edits(const bContext *C, bool for_render)
{ {
Object *obact = CTX_data_active_object(C); Object *obact = CTX_data_active_object(C);
Object *obedit = CTX_data_edit_object(C); Object *obedit = CTX_data_edit_object(C);

View File

@@ -1086,8 +1086,6 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w
wmEventHandler *handler; wmEventHandler *handler;
char filepath[FILE_MAX]; char filepath[FILE_MAX];
Scene *scene = CTX_data_scene(C);
WM_event_remove_timer(wm, NULL, wm->autosavetimer); WM_event_remove_timer(wm, NULL, wm->autosavetimer);
/* if a modal operator is running, don't autosave, but try again in 10 seconds */ /* if a modal operator is running, don't autosave, but try again in 10 seconds */
@@ -1100,12 +1098,7 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w
} }
} }
if (scene) { ED_editors_flush_edits(C, false);
Object *ob = OBACT;
if (ob && ob->mode & OB_MODE_SCULPT)
multires_force_update(ob);
}
wm_autosave_location(filepath); wm_autosave_location(filepath);