diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
commit | a42ba82f638e481d7fd3c3ed2ba05c331ef6717e (patch) | |
tree | 81a2b9221799707b49b74a5df8bb3ff964ba78bd /source/blender/editors/mesh/editmesh_utils.c | |
parent | 7afbdff1b6c348227e652e1c3071ab7ba7c91c44 (diff) | |
parent | a73dd3476e7d180d3320afc04d218ce22f2f3bfc (diff) |
Merged changes in the trunk up to revision 50829.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
Also addressed code inconsistency due to changes in the trunk revision 50628 (color
management with OCIO) and 50806 (UV project material). OCIO-related changes are marked
OCIO_TODO as in some other files modified in revision 50628.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_utils.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 03e2f2691a8..b844ba0baa2 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -535,6 +535,16 @@ static void *getEditMesh(bContext *C) 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 */ @@ -546,13 +556,14 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata) UndoMesh *um = MEM_callocN(sizeof(UndoMesh), "undo Mesh"); /* make sure shape keys work */ - um->me.key = obme->key ? copy_key_nolib(obme->key) : NULL; + um->me.key = obme->key ? BKE_key_copy_nolib(obme->key) : NULL; /* BM_mesh_validate(em->bm); */ /* for troubleshooting */ 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 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata)) UndoMesh *um = umv; BMesh *bm; - ob->shapenr = em->bm->shapenr; + ob->shapenr = em->bm->shapenr = um->shapenr; EDBM_mesh_free(em); |