Fix T37967: autosave does not save dynamic topology edits while in sculpt mode.
This commit is contained in:
parent
018fe81779
commit
fbf821c50b
Notes:
blender-bot
2023-02-14 11:26:18 +01:00
Referenced by issue #37967, Auto Save doesn't save Dyn- topo sculpting
|
@ -46,7 +46,7 @@ struct Mesh;
|
|||
void ED_editors_init(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 ************************ */
|
||||
|
||||
|
|
|
@ -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;
|
||||
struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : NULL;
|
||||
const char *name;
|
||||
Object *active_object = CTX_data_active_object(C);
|
||||
ScrArea *sa;
|
||||
|
||||
/* only one render job at a time */
|
||||
|
|
|
@ -143,7 +143,7 @@ void ED_editors_exit(bContext *C)
|
|||
|
||||
/* flush any temp data from object editing to DNA before writing files,
|
||||
* 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 *obedit = CTX_data_edit_object(C);
|
||||
|
|
|
@ -1086,8 +1086,6 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w
|
|||
wmEventHandler *handler;
|
||||
char filepath[FILE_MAX];
|
||||
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
|
||||
WM_event_remove_timer(wm, NULL, wm->autosavetimer);
|
||||
|
||||
/* 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) {
|
||||
Object *ob = OBACT;
|
||||
|
||||
if (ob && ob->mode & OB_MODE_SCULPT)
|
||||
multires_force_update(ob);
|
||||
}
|
||||
ED_editors_flush_edits(C, false);
|
||||
|
||||
wm_autosave_location(filepath);
|
||||
|
||||
|
|
Loading…
Reference in New Issue