diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2005-07-30 23:50:51 +0400 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2005-07-30 23:50:51 +0400 |
commit | 3b7d40cfdb524403a094e50128d2b74e822f0351 (patch) | |
tree | d9ef1e9ab856d4ea11546e4b0eb61c58c45a3d3e | |
parent | 697b22cc414298ef94f32f5f1b34fa5fa351c4db (diff) |
For edgeslide control rail there are 2 options:
Scroll Up/Down and Left/Right arrow key will cycle through the control edges in either direction.
I got rid of SHIFT for the time being.
-rw-r--r-- | source/blender/src/editmesh_tools.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 6b0919d3d9f..8daabff5d71 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -4648,8 +4648,7 @@ int EdgeSlide(short immediate, float imperc) glVertex3fv(tempsv->down->v2->co); } glEnd(); - glPopMatrix(); - + glPopMatrix(); /* Determine the % on wich the loop should be cut */ @@ -4659,7 +4658,6 @@ int EdgeSlide(short immediate, float imperc) if (len==0) {len = 0.0001;} labda= ( rc[0]*(v1[0]-v2[0]) + rc[1]*(v1[1]-v2[1]) )/len; - if(labda<=0.0) labda=0.0; else if(labda>=1.0)labda=1.0; @@ -4673,12 +4671,7 @@ int EdgeSlide(short immediate, float imperc) perc *= 10; perc = floor(perc); perc /= 10; - } else if (G.qual == LR_SHIFTKEY){ - perc *= 1000; - perc = floor(perc); - perc /= 1000; - } - + } sprintf(str, "Percentage %f", perc); headerprint(str); screen_swapbuffers(); @@ -4705,7 +4698,7 @@ int EdgeSlide(short immediate, float imperc) if(val && event==MIDDLEMOUSE){ perc = 0; immediate = 1; - } else if(val && ( event==WHEELUPMOUSE)) { // Scroll through Control Edges + } else if(val && (event==RIGHTARROWKEY || event==WHEELUPMOUSE)) { // Scroll through Control Edges look = vertlist; while(look){ if(nearest == (EditVert*)look->link){ @@ -4718,6 +4711,22 @@ int EdgeSlide(short immediate, float imperc) } look = look->next; } + }else if(val && (event==LEFTARROWKEY || event==WHEELDOWNMOUSE)) { // Scroll through Control Edges + look = vertlist; + while(look){ + if(look->next){ + if(look->next->link == nearest){ + nearest = (EditVert*)look->link; + break; + } + } else { + if((EditVert*)vertlist->link == nearest){ + nearest = look->link; + break; + } + } + look = look->next; + } } } } else { |