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:
authorJoseph Eagar <joeedh@gmail.com>2010-07-22 08:54:53 +0400
committerJoseph Eagar <joeedh@gmail.com>2010-07-22 08:54:53 +0400
commita23e3c42f55efed357e7b1604dbec57ab5c02a82 (patch)
treedd5a0c89c21ad25464f14ecaf1d7bfe9d32b42c0
parent209b0773a9f236c03555b6466f01f83d170091e0 (diff)
=bmesh= knife tool doesn't triangulate anymore, also supports more cuts
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index fc886656702..a614521cdba 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -3600,7 +3600,7 @@ static float bm_seg_intersect(BMEdge *e, CutCurve *c, int len, char mode,
return(perc);
}
-#define MAX_CUTS 256
+#define MAX_CUTS 2048
static int knife_cut_exec(bContext *C, wmOperator *op)
{
@@ -3616,7 +3616,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
struct GHash *gh;
float isect=0.0;
float *scr, co[4];
- int len=0, isected, flag, i;
+ int len=0, isected, i;
short numcuts=1, mode= RNA_int_get(op->ptr, "type");
/* edit-object needed for matrix, and ar->regiondata for projections to work */
@@ -3674,10 +3674,14 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
BMO_Flag_To_Slot(bm, &bmop, "edges", 1, BM_EDGE);
- BMO_Set_Int(&bmop, "numcuts", numcuts);
- flag = B_KNIFE;
if (mode == KNIFE_MIDPOINT) numcuts = 1;
- BMO_Set_Int(&bmop, "flag", flag);
+ BMO_Set_Int(&bmop, "numcuts", numcuts);
+
+ BMO_Set_Int(&bmop, "flag", B_KNIFE);
+ BMO_Set_Int(&bmop, "quadcornertype", SUBD_STRAIGHT_CUT);
+ BMO_Set_Int(&bmop, "singleedge", 0);
+ BMO_Set_Int(&bmop, "gridfill", 0);
+
BMO_Set_Float(&bmop, "radius", 0);
BMO_Exec_Op(bm, &bmop);