[Bf-blender-cvs] [ea6620c] master: Fix T37796, Mesh lost after exiting sculpt mode and undoing.

Antony Riakiotakis noreply at git.blender.org
Wed May 14 00:12:09 CEST 2014


Commit: ea6620cb822ff1fa56c8916fe39b18f32484e512
Author: Antony Riakiotakis
Date:   Wed May 14 01:09:09 2014 +0300
https://developer.blender.org/rBea6620cb822ff1fa56c8916fe39b18f32484e512

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

===================================================================

M	source/blender/editors/util/undo.c

===================================================================

diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 4d14323..ee02e0c 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);
 	}




More information about the Bf-blender-cvs mailing list