[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50685] trunk/blender/source/blender/ editors/mesh/editmesh_utils.c: fix [#32442] UNDO causes actual shape key to be lost, undoing a modification of another shape key.
Campbell Barton
ideasman42 at gmail.com
Mon Sep 17 08:14:10 CEST 2012
Revision: 50685
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50685
Author: campbellbarton
Date: 2012-09-17 06:14:09 +0000 (Mon, 17 Sep 2012)
Log Message:
-----------
fix [#32442] UNDO causes actual shape key to be lost, undoing a modification of another shape key.
Modified Paths:
--------------
trunk/blender/source/blender/editors/mesh/editmesh_utils.c
Modified: trunk/blender/source/blender/editors/mesh/editmesh_utils.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_utils.c 2012-09-17 05:31:41 UTC (rev 50684)
+++ trunk/blender/source/blender/editors/mesh/editmesh_utils.c 2012-09-17 06:14:09 UTC (rev 50685)
@@ -535,6 +535,16 @@
typedef struct UndoMesh {
Mesh me;
int selectmode;
+
+ /** \note
+ * this isn't a prefect solution, if you edit keys and change shapes this works well (fixing [#32442]),
+ * but editing shape keys, going into object mode, removing or changing their order,
+ * then go back into editmode and undo will give issues - where the old index will be out of sync
+ * with the new object index.
+ *
+ * There are a few ways this could be made to work but for now its a known limitation with mixing
+ * object and editmode operations - Campbell */
+ int shapenr;
} UndoMesh;
/* undo simply makes copies of a bmesh */
@@ -553,6 +563,7 @@
BM_mesh_bm_to_me(em->bm, &um->me, FALSE);
um->selectmode = em->selectmode;
+ um->shapenr = em->bm->shapenr;
return um;
}
@@ -564,7 +575,7 @@
UndoMesh *um = umv;
BMesh *bm;
- ob->shapenr = em->bm->shapenr;
+ ob->shapenr = em->bm->shapenr = um->shapenr;
EDBM_mesh_free(em);
More information about the Bf-blender-cvs
mailing list