[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58187] trunk/blender/source/blender/ editors/mesh/editmesh_loopcut.c: fix [#36106] Defining the Loopcut number with the keyboard is limited to 130

Campbell Barton ideasman42 at gmail.com
Fri Jul 12 03:33:45 CEST 2013


Revision: 58187
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58187
Author:   campbellbarton
Date:     2013-07-12 01:33:42 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c

Modified: trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c	2013-07-12 00:29:06 UTC (rev 58186)
+++ trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c	2013-07-12 01:33:42 UTC (rev 58187)
@@ -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 @@
 				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 @@
 			
 			/* 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);




More information about the Bf-blender-cvs mailing list