From ea6620cb822ff1fa56c8916fe39b18f32484e512 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Wed, 14 May 2014 01:09:09 +0300 Subject: Fix T37796, Mesh lost after exiting sculpt mode and undoing. Issue here is that upon entering sculpt mode, the mesh (and the object mode) is stored in global undo. Now made the code similar to edit mode, but since we don't really have any operator to push, this is just ignored for now. I have tried just disabling the sculpt toggle operator undo flag but this didn't work due to the nature recursive of the operator calls --- source/blender/editors/util/undo.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/util/undo.c') diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 4d14323a20b..ee02e0c396a 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -105,6 +105,9 @@ void ED_undo_push(bContext *C, const char *str) PE_undo_push(CTX_data_scene(C), str); } + else if (obact && obact->mode & OB_MODE_SCULPT) { + /* do nothing for now */ + } else { BKE_write_undo(C, str); } -- cgit v1.2.3