diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-12-21 05:39:39 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-12-21 05:39:39 +0300 |
commit | 5affd02156e0c00df1bb2aff43df71b906b88e8c (patch) | |
tree | 2155863d4cf84ac5cd2a7fb30982434be806e94a | |
parent | e2f7a331134921a42be4b7f3d773fe2969fffa3d (diff) |
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.
-rw-r--r-- | source/blender/editors/mesh/loopcut.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 72bd4ee3541..9fea0d08e70 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -409,18 +409,24 @@ static int ringsel_modal (bContext *C, wmOperator *op, wmEvent *event) ED_region_tag_redraw(lcd->ar); break; case WHEELUPMOUSE: /* change number of cuts */ - cuts++; - RNA_int_set(op->ptr,"number_cuts",cuts); - ringsel_find_edge(lcd, C, lcd->ar, cuts); - - ED_region_tag_redraw(lcd->ar); + case PAGEUPKEY: + if (event->val == KM_PRESS) { + cuts++; + RNA_int_set(op->ptr,"number_cuts",cuts); + ringsel_find_edge(lcd, C, lcd->ar, cuts); + + ED_region_tag_redraw(lcd->ar); + } break; case WHEELDOWNMOUSE: /* change number of cuts */ - cuts=MAX2(cuts-1,1); - RNA_int_set(op->ptr,"number_cuts",cuts); - ringsel_find_edge(lcd, C, lcd->ar,cuts); - - ED_region_tag_redraw(lcd->ar); + case PAGEDOWNKEY: + if (event->val == KM_PRESS) { + cuts=MAX2(cuts-1,1); + RNA_int_set(op->ptr,"number_cuts",cuts); + ringsel_find_edge(lcd, C, lcd->ar,cuts); + + ED_region_tag_redraw(lcd->ar); + } break; case MOUSEMOVE: { /* mouse moved somewhere to select another loop */ int dist = 75; |