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
path: root/source
diff options
context:
space:
mode:
authorGeoffrey Bantle <hairbat@yahoo.com>2006-09-19 04:08:09 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2006-09-19 04:08:09 +0400
commite7874b3ff0d5cb562cafac60295eec5a108e06ff (patch)
tree271c073304a8c69df6388736f30e662f8d94a8ad /source
parentab2c57a29d3c4b6f61e2a342fc801959eaa54768 (diff)
->Knife Midpoint and Vertex Cutting
Cutting through vertices and vertex snap was only supported in 'knife exact' mode. Now works for 'Knife Midpoint' as well. (Multicut and vertex cutting would require N-Gons)
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/editmesh_loop.c8
-rw-r--r--source/blender/src/editmesh_tools.c5
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c
index 06da8711028..0bf40a89296 100644
--- a/source/blender/src/editmesh_loop.c
+++ b/source/blender/src/editmesh_loop.c
@@ -506,7 +506,7 @@ static CutCurve *get_mouse_trail(int *len, char mode, char cutmode, struct GHash
mywinset(curarea->win);
- if(cutmode == KNIFE_EXACT){
+ if(cutmode != KNIFE_MULTICUT){
/*redraw backbuffer if in zbuffered selection mode but not vertex selection*/
if(G.vd->drawtype>OB_WIRE && (G.vd->flag & V3D_ZBUF_SELECT)) {
oldmode = G.scene->selectmode;
@@ -554,7 +554,7 @@ static CutCurve *get_mouse_trail(int *len, char mode, char cutmode, struct GHash
/*handle vsnap*/
vsnap = 0;
- if(cutmode == KNIFE_EXACT){
+ if(cutmode != KNIFE_MULTICUT){
qual = get_qual();
if(qual & LR_CTRLKEY) vsnap = 1;
}
@@ -810,7 +810,7 @@ static float seg_intersect(EditEdge *e, CutCurve *c, int len, char mode, struct
}
/*check for *exact* vertex intersection first*/
- if(mode==KNIFE_EXACT){
+ if(mode!=KNIFE_MULTICUT){
for (i=0; i<len; i++){
if (i>0){
x11=x12;
@@ -901,7 +901,7 @@ static float seg_intersect(EditEdge *e, CutCurve *c, int len, char mode, struct
/* Intersect inside bounding box of edge?*/
if ((xi>=x2min)&&(xi<=x2max)&&(yi<=y2max)&&(yi>=y2min)){
/*test for vertex intersect that may be 'close enough'*/
- if(mode==KNIFE_EXACT){
+ if(mode!=KNIFE_MULTICUT){
if(xi <= (x21 + threshold) && xi >= (x21 - threshold)){
if(yi <= (y21 + threshold) && yi >= (y21 - threshold)){
e->v1->f1 = 1;
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index f8e3f9aafa6..090323fff83 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -2768,7 +2768,7 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
if(facetype == 4) {
switch(edgecount) {
case 0:
- if(beauty & B_KNIFE && beauty & B_PERCENTSUBD){
+ if(beauty & B_KNIFE && numcuts == 1){
/*Test for when knifing through two opposite verts but no edges*/
touchcount = 0;
if(ef->v1->f1) touchcount++;
@@ -2789,8 +2789,7 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
break;
case 1:
- /*this whole damn thing is nasty. Rewrite it*/
- if(beauty & B_KNIFE && beauty & B_PERCENTSUBD){
+ if(beauty & B_KNIFE && numcuts == 1){
/*Test for when knifing through an edge and one vert*/
touchcount = 0;
if(ef->v1->f1) touchcount++;