diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-12 18:36:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-12 18:36:51 +0300 |
commit | dcd662c6951c33cb1d72ed693348595227efc9ae (patch) | |
tree | a721abccafac8e9596211815d6714c89b24e3ce2 /source | |
parent | 0996ee3bb81bd3b9e68b34f75590699a6908d7a0 (diff) |
BMesh: Tweak behavior for select more/less
Stepping over faces gives overall nice results but it stopped wire edges from working.
Now step over wire too.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/operators/bmo_utils.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index e7b65a10790..da1991a187d 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -236,6 +236,20 @@ static void bmo_region_extend_expand( bmo_face_flag_set_flush(bm, f, SEL_FLAG, true); } } + + /* handle wire edges (when stepping over faces) */ + { + BMIter eiter; + BMEdge *e; + BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) { + if (BM_edge_is_wire(e)) { + if (!BMO_elem_flag_test(bm, e, SEL_FLAG)) { + BMO_elem_flag_enable(bm, e, SEL_FLAG); + BMO_elem_flag_enable(bm, BM_edge_other_vert(e, v), SEL_FLAG); + } + } + } + } } } } @@ -306,6 +320,21 @@ static void bmo_region_extend_contract( break; } } + + /* handle wire edges (when stepping over faces) */ + if (!found) { + BMIter eiter; + BMEdge *e; + + BM_ITER_ELEM (e, &eiter, v, BM_EDGES_OF_VERT) { + if (BM_edge_is_wire(e)) { + if (!BMO_elem_flag_test(bm, e, SEL_ORIG)) { + found = true; + break; + } + } + } + } } if (found) { |