diff options
author | Pratik Borhade <PratikPB2123> | 2021-03-10 14:02:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-10 15:04:37 +0300 |
commit | 493628e5418b1543d82e314b34832ad6cc365055 (patch) | |
tree | cd874cc27934de2e3df9f9da288e54ab9c9fc5ef /source/blender/editors/mesh | |
parent | 4fece16d458e75bc408c62814c9d2b86637ab92e (diff) |
Fix T67190: Edge Loop Select doesn't support non-manifold edges
- New Walker added `bmw_NonManifoldedgeWalker_type`.
- This walks over edges connected with 3 or more faces connected.
Ref D10497 with edits.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 903e50bf668..35608a4abde 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1524,7 +1524,13 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op) else { for (edindex = 0; edindex < totedgesel; edindex += 1) { eed = edarray[edindex]; - walker_select(em, BMW_EDGELOOP, eed, true); + bool non_manifold = BM_edge_face_count_is_over(eed, 2); + if (non_manifold) { + walker_select(em, BMW_EDGELOOP_NONMANIFOLD, eed, true); + } + else { + walker_select(em, BMW_EDGELOOP, eed, true); + } } EDBM_selectmode_flush(em); } @@ -1585,6 +1591,7 @@ static void mouse_mesh_loop_edge( BMEditMesh *em, BMEdge *eed, bool select, bool select_clear, bool select_cycle) { bool edge_boundary = false; + bool non_manifold = BM_edge_face_count_is_over(eed, 2); /* Cycle between BMW_EDGELOOP / BMW_EDGEBOUNDARY. */ if (select_cycle && BM_edge_is_boundary(eed)) { @@ -1610,6 +1617,9 @@ static void mouse_mesh_loop_edge( if (edge_boundary) { walker_select(em, BMW_EDGEBOUNDARY, eed, select); } + else if (non_manifold) { + walker_select(em, BMW_EDGELOOP_NONMANIFOLD, eed, select); + } else { walker_select(em, BMW_EDGELOOP, eed, select); } |