diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-24 18:54:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-24 18:54:14 +0400 |
commit | b5e90d6b1c8dd65adaaae62f3facc8f532e06f40 (patch) | |
tree | a1c11b3260054c6db3c741ae7cfbc24e24be093d | |
parent | 1a2d0d84dab40176ca8a390a2986f3f3fed01d78 (diff) |
fix [#32357] Subdivide fails on newly created edge
problem since bmesh merge, new edges were not selected.
-rw-r--r-- | source/blender/bmesh/intern/bmesh_opdefines.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_create.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 986c84b0639..48d8583ee7c 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -408,6 +408,8 @@ static BMOpDefine bmo_contextual_create_def = { "contextual_create", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry. {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* newly-made face(s) */ + /* note, this is for stand-alone edges only, not edges which are apart of newly created faces */ + {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* newly-made edge(s) */ {BMO_OP_SLOT_INT, "mat_nr"}, /* material to use */ {BMO_OP_SLOT_BOOL, "use_smooth"}, /* material to use */ {0, /* null-terminating sentinel */}}, diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c index db09c5f3d27..4723b631c5f 100644 --- a/source/blender/bmesh/operators/bmo_create.c +++ b/source/blender/bmesh/operators/bmo_create.c @@ -1415,6 +1415,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op) /* create edge */ e = BM_edge_create(bm, verts[0], verts[1], NULL, TRUE); BMO_elem_flag_enable(bm, e, ELE_OUT); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, ELE_OUT); } else if (0) { /* nice feature but perhaps it should be a different tool? */ @@ -1460,6 +1461,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op) } } } + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, ELE_OUT); /* done creating edges */ } else if (amount > 2) { diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 07b53b1cf7f..843a36cda35 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -1056,6 +1056,7 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) BMO_op_exec(em->bm, &bmop); BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE); + BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_EDGE, BM_ELEM_SELECT, TRUE); if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; |