diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2005-08-05 19:52:28 +0400 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2005-08-05 19:52:28 +0400 |
commit | 32656ad7ef8e8ecc5890ad517dd925db21efb3e7 (patch) | |
tree | 314b146a896f16847e8fbdb18b6eb935dfd51484 /source/blender/src/editmesh_loop.c | |
parent | 46a8c1106424ab2b1bb7d733cbfe2a224b9a9aa7 (diff) |
Now while choosing an edge in loopcut, S will toggle loopcut smooth. There is a headerprint to show current status of smooth.
Also a little tweak in subd smooth. is still not perfect in full quads/tris cases
Diffstat (limited to 'source/blender/src/editmesh_loop.c')
-rw-r--r-- | source/blender/src/editmesh_loop.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c index 9c043bbb66a..8d6a2f66e2d 100644 --- a/source/blender/src/editmesh_loop.c +++ b/source/blender/src/editmesh_loop.c @@ -208,7 +208,7 @@ void CutEdgeloop(int numcuts) EditEdge *nearest=NULL, *eed; int keys = 0, holdnum=0, selectmode; short mvalo[2] = {0,0}, mval[2]; - short event,val,choosing=1,cancel=0,dist,cuthalf = 0; + short event,val,choosing=1,cancel=0,dist,cuthalf = 0,smooth=0; char msg[128]; selectmode = G.scene->selectmode; @@ -234,8 +234,15 @@ void CutEdgeloop(int numcuts) nearest = findnearestedge(&dist); // returns actual distance in dist scrarea_do_windraw(curarea); // after findnearestedge, backbuf! + sprintf(msg,"Number of Cuts: %d",numcuts); - headerprint(msg); + if(smooth){ + sprintf(msg,"%s (S)mooth: on",msg); + } else { + sprintf(msg,"%s (S)mooth: off",msg); + } + + headerprint(msg); /* Need to figure preview */ if(nearest){ @@ -287,6 +294,13 @@ void CutEdgeloop(int numcuts) break; } } + else if(val && event==SKEY) + { + if(smooth){smooth=0;} + else { smooth=1; } + mvalo[0] = -1; + break; + } else if(val){ holdnum = -1; switch(event){ @@ -361,8 +375,11 @@ void CutEdgeloop(int numcuts) edgering_sel(nearest, 1, 0); /* now cut the loops */ - esubdivideflag(SELECT,0,0,numcuts,1); - + if(smooth){ + esubdivideflag(SELECT,0,B_SMOOTH,numcuts,1); + } else { + esubdivideflag(SELECT,0,0,numcuts,1); + } /* if this was a single cut, enter edgeslide mode */ if(numcuts == 1){ if(cuthalf) |