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>2012-12-17 19:02:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-17 19:02:26 +0400
commit1fe6d543a5f45ddd7d49a0237bfe32e35e86ce5e (patch)
tree8cb9102581ccf66d885a5f52c008bf7fec8b3f75 /source/blender/editors
parent95225cf11057a985867f413f17871c53742eb5d0 (diff)
fix/workaround [#33493] checker de-select and edge loops
Checker de-select by default would give uneven selection on a circle, this isnt really a bug but the offset used would give unevenly spaced selection even if the 3rd vertex for eg could be evenly selected on a circle. Change how the offset works so the active element always remains selected when the offset is set to zero, this tends to give more even de-selection.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/editmesh_select.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index a8f6ccc6c2c..6ca7777f8e2 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -2630,7 +2630,8 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op)
int nth = RNA_int_get(op->ptr, "nth");
int offset = RNA_int_get(op->ptr, "offset");
- offset = MIN2(nth, offset);
+ /* so input of offset zero ends up being (nth - 1) */
+ offset = (offset + (nth - 1)) % nth;
if (edbm_deselect_nth(em, nth, offset) == 0) {
BKE_report(op->reports, RPT_ERROR, "Mesh has no active vert/edge/face");