diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-21 16:14:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-21 16:14:07 +0400 |
commit | 96b024333edf31fb02881b1c2fbacaf556a49439 (patch) | |
tree | 6afcb426213979c4963215f1d91abcf40da20ec9 /source/blender/editors/mesh | |
parent | f910abaddaec82dde3bd27ae3fa720b37f2359fc (diff) |
fix [#31047] ctrl+mouse select in edit-mode does not select external object
fix [#30535] Shortest Path Select not working well in vertex mode.
regression from after bmesh merge, Ctrl+Right mouse for selecting shortest path is meant for edge mode only.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index c68d2a91460..946eaf8d3c8 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -663,7 +663,7 @@ static int edbm_rip_invoke__edge(bContext *C, wmOperator *op, wmEvent *event) } /* note: the output of the bmesh operator is ignored, since we built - * the contiguous loop pairs to split already, its possibe that some + * the contiguous loop pairs to split already, its possible that some * edge did not split even though it was tagged which would not work * as expected (but not crash), however there are checks to ensure * tagged edges will split. So far its not been an issue. */ diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index b6e162cb220..12fa5f66a69 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1415,7 +1415,17 @@ static int edbm_shortest_path_select_invoke(bContext *C, wmOperator *UNUSED(op), return OPERATOR_FINISHED; } - + +static int edbm_shortest_path_select_poll(bContext *C) +{ + if(ED_operator_editmesh_region_view3d(C)) { + Object *obedit = CTX_data_edit_object(C); + BMEditMesh *em = BMEdit_FromObject(obedit); + return (em->selectmode & SCE_SELECT_EDGE) != 0; + } + return 0; +} + void MESH_OT_select_shortest_path(wmOperatorType *ot) { /* identifiers */ @@ -1425,7 +1435,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot) /* api callbacks */ ot->invoke = edbm_shortest_path_select_invoke; - ot->poll = ED_operator_editmesh; + ot->poll = edbm_shortest_path_select_poll; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; |