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:
authorCampbell Barton <ideasman42@gmail.com>2013-08-11 03:22:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-11 03:22:35 +0400
commit76cb6829e50b53211858b514f290881872a43d45 (patch)
treee82ba07dc2fa26b77307d846887c65a9366cce79
parent3627541894e2875b74d974abfe9ead60b68c4d05 (diff)
edge-split now leaves split edges selected
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 629618fd353..4610bb89ae4 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -852,22 +852,23 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(obedit);
- BMesh *bm = em->bm;
- BMOperator bmop;
- int len = 0;
-
- if (!EDBM_op_init(em, &bmop, op, "split_edges edges=%he", BM_ELEM_SELECT)) {
- return OPERATOR_CANCELLED;
- }
- BMO_op_exec(bm, &bmop);
- len = BMO_slot_get(bmop.slots_out, "edges.out")->len;
- if (!EDBM_op_finish(em, &bmop, op, true)) {
+
+ if (!EDBM_op_call_and_selectf(
+ em, op,
+ "edges.out", false,
+ "split_edges edges=%he",
+ BM_ELEM_SELECT))
+ {
return OPERATOR_CANCELLED;
}
+ if (em->selectmode == SCE_SELECT_FACE) {
+ EDBM_select_flush(em);
+ }
+
EDBM_update_generic(em, true, true);
- return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
+ return OPERATOR_FINISHED;
}
void MESH_OT_edge_split(wmOperatorType *ot)