From 018fe81779e81ad43b16c74969764ae3b71d4b40 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 20 Jan 2014 14:11:12 +0100 Subject: Fix T38269: scene full copy in mesh edit or sculpt mode did not copy mesh edits. --- source/blender/windowmanager/intern/wm_files.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 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 c4c91b40df2..71d78a83b00 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -870,22 +870,6 @@ bool write_crash_blend(void) } } -/** - * Flush any temp data from object editing to DNA before writing the blend file to disk. - */ -static void write_flush_editdata(bContext *C) -{ - Object *obedit; - - obedit = CTX_data_edit_object(C); - - if (obedit) { - ED_object_editmode_load(obedit); - } - - ED_sculpt_force_update(C); -} - /** * \see #wm_homefile_write_exec wraps #BLO_write_file in a similar way. */ @@ -943,7 +927,7 @@ int wm_file_write(bContext *C, const char *filepath, int fileflags, ReportList * /* don't forget not to return without! */ WM_cursor_wait(1); - write_flush_editdata(C); + ED_editors_flush_edits(C, false); fileflags |= G_FILE_HISTORY; /* write file history */ @@ -1019,7 +1003,7 @@ int wm_homefile_write_exec(bContext *C, wmOperator *op) BLI_make_file_string("/", filepath, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_STARTUP_FILE); printf("trying to save homefile at %s ", filepath); - write_flush_editdata(C); + ED_editors_flush_edits(C, false); /* force save as regular blend file */ fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_LOCK | G_FILE_SIGN | G_FILE_HISTORY); -- cgit v1.2.3