diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-27 05:02:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-27 05:02:32 +0400 |
commit | 84361f602a98d2ac35c6cc81eb897d593977e743 (patch) | |
tree | 2634f12c4b03a3bed8542b2dc58f2c96e03833e3 /source | |
parent | 7cbfe1839bf1402f430715292418f2cd5180107d (diff) |
fix [#33651] Spin tool destroys unselected loose vertex
bmesh.ops.extrude_face_region() didn't check for isolated verts (not connected to geometry), and removed them, happened for Ctrl+LMB extrude too.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/operators/bmo_dupe.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_extrude.c | 32 |
2 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index 9a58d7acfb9..f288901c272 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -483,7 +483,7 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op) { BMOperator dupop, extop; float cent[3], dvec[3]; - float axis[3] = {0.0f, 0.0f, 1.0f}; + float axis[3]; float rmat[3][3]; float phi; int steps, do_dupli, a, usedvec; diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index 956d9e5767e..2cca3fcb24a 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -315,27 +315,29 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op) /* calculate verts to delete */ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { - found = FALSE; + if (v->e) { /* only deal with verts attached to geometry [#33651] */ + found = FALSE; - BM_ITER_ELEM (e, &viter, v, BM_EDGES_OF_VERT) { - if (!BMO_elem_flag_test(bm, e, EXT_INPUT) || !BMO_elem_flag_test(bm, e, EXT_DEL)) { - found = TRUE; - break; - } - } - - /* avoid an extra loop */ - if (found == TRUE) { - BM_ITER_ELEM (f, &viter, v, BM_FACES_OF_VERT) { - if (!BMO_elem_flag_test(bm, f, EXT_INPUT)) { + BM_ITER_ELEM (e, &viter, v, BM_EDGES_OF_VERT) { + if (!BMO_elem_flag_test(bm, e, EXT_INPUT) || !BMO_elem_flag_test(bm, e, EXT_DEL)) { found = TRUE; break; } } - } - if (found == FALSE) { - BMO_elem_flag_enable(bm, v, EXT_DEL); + /* avoid an extra loop */ + if (found == TRUE) { + BM_ITER_ELEM (f, &viter, v, BM_FACES_OF_VERT) { + if (!BMO_elem_flag_test(bm, f, EXT_INPUT)) { + found = TRUE; + break; + } + } + } + + if (found == FALSE) { + BMO_elem_flag_enable(bm, v, EXT_DEL); + } } } |