Quicky Loopcut patch:

In addition to the existing scrollwheel up/down, PageUp/Down can now be used to set the number of cuts while previewing the cut location.
This commit is contained in:
2009-12-21 02:39:39 +00:00
parent e2f7a33113
commit 5affd02156

View File

@@ -409,18 +409,24 @@ static int ringsel_modal (bContext *C, wmOperator *op, wmEvent *event)
ED_region_tag_redraw(lcd->ar); ED_region_tag_redraw(lcd->ar);
break; break;
case WHEELUPMOUSE: /* change number of cuts */ case WHEELUPMOUSE: /* change number of cuts */
cuts++; case PAGEUPKEY:
RNA_int_set(op->ptr,"number_cuts",cuts); if (event->val == KM_PRESS) {
ringsel_find_edge(lcd, C, lcd->ar, cuts); cuts++;
RNA_int_set(op->ptr,"number_cuts",cuts);
ED_region_tag_redraw(lcd->ar); ringsel_find_edge(lcd, C, lcd->ar, cuts);
ED_region_tag_redraw(lcd->ar);
}
break; break;
case WHEELDOWNMOUSE: /* change number of cuts */ case WHEELDOWNMOUSE: /* change number of cuts */
cuts=MAX2(cuts-1,1); case PAGEDOWNKEY:
RNA_int_set(op->ptr,"number_cuts",cuts); if (event->val == KM_PRESS) {
ringsel_find_edge(lcd, C, lcd->ar,cuts); cuts=MAX2(cuts-1,1);
RNA_int_set(op->ptr,"number_cuts",cuts);
ED_region_tag_redraw(lcd->ar); ringsel_find_edge(lcd, C, lcd->ar,cuts);
ED_region_tag_redraw(lcd->ar);
}
break; break;
case MOUSEMOVE: { /* mouse moved somewhere to select another loop */ case MOUSEMOVE: { /* mouse moved somewhere to select another loop */
int dist = 75; int dist = 75;