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.
This commit is contained in:
Campbell Barton
2012-12-17 15:02:26 +00:00
parent 95225cf110
commit 1fe6d543a5

View File

@@ -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");