Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-04-05 21:10:28 +0400
committerTon Roosendaal <ton@blender.org>2013-04-05 21:10:28 +0400
commitb18a7c3cd64bd3bb0dd203ff7d034d5d9f168b18 (patch)
treee7b0546ef0ba7040557ca0ec211eb337ffbe28be /source/blender/editors/util
parent5e0cdd647300d6cd2ff0f3582330f12653c5d166 (diff)
Bug fix #34866
Global undo/redo now clears the local undo editmode stack entirely. Error goes back to the 2.3 days, when undo was added. Global undo refreshes the entire internal database, so all ID pointers get invalid. This cases editmode undo storage to fail, if it uses ID pointers as well. The error was that for any Mesh undo stack, a single global undo would make the mesh stack corrupt. Back in edit mode, on undo you'd lose assigned texture images, or get bad crashes. The downside is that people expect this to work... it's a fun feature to maintain stacks separately. Having this instable is not acceptable though. Needs quite some redesign work to solve it (like Dalai's kill-the-tface project :)
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/undo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index fc603f7a593..e1451ee43e6 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -186,6 +186,11 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
//#ifdef WITH_PYTHON
// XXX BPY_scripts_clear_pyobjects();
//#endif
+
+ /* for global undo/redo we should just clear the editmode stack */
+ /* for example, texface stores image pointers */
+ undo_editmode_clear();
+
if (undoname)
BKE_undo_name(C, undoname);
else