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>2013-07-12 05:33:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-12 05:33:42 +0400
commit1d761d0eca64c61398b4430e3b39cc46a7f82e70 (patch)
treecdd2ad1802cf6b16416fcf8395ffbf05f6400e9e /source/blender/editors/mesh/editmesh_loopcut.c
parent55c79821b9c6fde4324391123d5a6c84ead866cd (diff)
fix [#36106] Defining the Loopcut number with the keyboard is limited to 130
mousewheel value is now clamped too and raised the limit to 500.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loopcut.c')
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 97e6a6e8aad..f7e983fb745 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -62,6 +62,7 @@
#include "mesh_intern.h" /* own include */
#define SUBD_SMOOTH_MAX 4.0f
+#define SUBD_CUTS_MAX 500
/* ringsel operator */
@@ -578,6 +579,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
break;
if (event->alt == 0) {
cuts++;
+ cuts = CLAMPIS(cuts, 0, SUBD_CUTS_MAX);
RNA_int_set(op->ptr, "number_cuts", cuts);
ringsel_find_edge(lcd, cuts);
show_cuts = true;
@@ -631,7 +633,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* allow zero so you can backspace and type in a value
* otherwise 1 as minimum would make more sense */
- cuts = CLAMPIS(value, 0, 130);
+ cuts = CLAMPIS(value, 0, SUBD_CUTS_MAX);
RNA_int_set(op->ptr, "number_cuts", cuts);
ringsel_find_edge(lcd, cuts);