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>2014-05-23 14:37:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-23 14:50:27 +0400
commitbec8cee7cf1c7b980c86298af430dbfaf1b7ed7e (patch)
tree368f754fd163dacacc7bb68010c212d03cbb9489
parentfad267bf57ce290b88392a5b895911f08f20748e (diff)
Fix T40324: Checker deselect fails for edge-rings
-rw-r--r--source/blender/editors/mesh/editmesh_select.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 7e58f3fb018..cd39d4a0776 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -2433,6 +2433,27 @@ void MESH_OT_select_less(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
+/**
+ * Check if we're connected to another selected efge.
+ */
+static bool bm_edge_is_select_isolated(BMEdge *e)
+{
+ BMIter viter;
+ BMVert *v;
+
+ BM_ITER_ELEM (v, &viter, e, BM_VERTS_OF_EDGE) {
+ BMIter eiter;
+ BMEdge *e_other;
+
+ BM_ITER_ELEM (e_other, &eiter, v, BM_EDGES_OF_VERT) {
+ if ((e_other != e) && BM_elem_flag_test(e_other, BM_ELEM_SELECT)) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
/* Walk all reachable elements of the same type as h_act in breadth-first
* order, starting from h_act. Deselects elements if the depth when they
* are reached is not a multiple of "nth". */
@@ -2460,8 +2481,10 @@ static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h
mask_vert = BMO_ELE_TAG;
break;
case BM_EDGE:
+ /* When an edge has no connected-selected edges,
+ * use face-stepping (supports edge-rings) */
itertype = BM_EDGES_OF_MESH;
- walktype = BMW_VERT_SHELL;
+ walktype = bm_edge_is_select_isolated((BMEdge *)h_act) ? BMW_FACE_SHELL : BMW_VERT_SHELL;
flushtype = SCE_SELECT_EDGE;
mask_edge = BMO_ELE_TAG;
break;