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:
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loop.c')
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 72e9e3b6d9e..acbe5ef2144 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -199,7 +199,7 @@ static void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcut
EditEdge *nearest=NULL, *eed;
float fac;
int keys = 0, holdnum=0, selectmode, dist;
- short mvalo[2] = {0, 0}, mval[2] = {0, 0};
+ int mvalo[2] = {0, 0}, mval[2] = {0, 0};
short event=0, val, choosing=1, cancel=0, cuthalf = 0, smooth=0;
short hasHidden = 0;
char msg[128];
@@ -608,9 +608,12 @@ static float seg_intersect(EditEdge *e, CutCurve *c, int len, char mode, struct
return(perc);
}
-
+/* for multicut */
#define MAX_CUTS 256
+/* for amount of edges */
+#define MAX_CUT_EDGES 1024
+
static int knife_cut_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
@@ -618,7 +621,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
EditEdge *eed;
EditVert *eve;
- CutCurve curve[MAX_CUTS];
+ CutCurve curve[MAX_CUT_EDGES];
struct GHash *gh;
float isect=0.0;
float *scr, co[4];
@@ -642,7 +645,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
RNA_float_get_array(&itemptr, "loc", (float *)&curve[len]);
len++;
- if(len>= MAX_CUTS) break;
+ if(len>= MAX_CUT_EDGES) break;
}
RNA_END;
@@ -716,6 +719,7 @@ void MESH_OT_knife_cut(wmOperatorType *ot)
ot->invoke= WM_gesture_lines_invoke;
ot->modal= WM_gesture_lines_modal;
ot->exec= knife_cut_exec;
+ ot->cancel= WM_gesture_lines_cancel;
ot->poll= EM_view3d_poll;