diff options
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 1 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_lib.c | 5 | ||||
-rw-r--r-- | source/blender/editors/util/editmode_undo.c | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 04affbac803..1e0dd78e392 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -133,6 +133,7 @@ void EM_selectmode_set(struct EditMesh *em); void EM_select_flush(struct EditMesh *em); void EM_convertsel(struct EditMesh *em, short oldmode, short selectmode); void EM_validate_selections(struct EditMesh *em); +void EM_selectmode_to_scene(struct Scene *scene, struct Object *obedit); /* exported to transform */ int EM_get_actSelection(struct EditMesh *em, struct EditSelection *ese); diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index b3e96729201..a5ce4ee5dcd 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -743,6 +743,11 @@ void EM_convertsel(EditMesh *em, short oldmode, short selectmode) EM_nfaces_selected(em); } +void EM_selectmode_to_scene(struct Scene *scene, struct Object *obedit) +{ + scene->toolsettings->selectmode= get_mesh(obedit)->edit_mesh->selectmode; +} + /* when switching select mode, makes sure selection is consistent for editing */ /* also for paranoia checks to make sure edge or face mode works */ void EM_selectmode_set(EditMesh *em) diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index a21ff088f2e..f58cd148dec 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -269,6 +269,11 @@ void undo_editmode_step(bContext *C, int step) } } + /* special case for editmesh, mode must be copied back to the scene */ + if(obedit->type == OB_MESH) { + EM_selectmode_to_scene(CTX_data_scene(C), obedit); + } + DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); /* XXX notifiers */ |