diff options
author | Martin Poirier <theeth@yahoo.com> | 2003-12-02 03:19:08 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2003-12-02 03:19:08 +0300 |
commit | 29ac120599ef2e1183f67be33a471377d526ccd8 (patch) | |
tree | 1740d870649f58941d7e6c2c2a203cfaf1bd51f7 | |
parent | 4930270ea7be40410047dd59aa29fd3b36c6e17b (diff) |
Fixed constline camera grab
There's a bug left with local axis constraints, but it's only a minor annoyance and fixing it would take more time that I can give (finals at the U you know...)
Also deleted some vestige of an old feature that was disabled.
-rw-r--r-- | source/blender/src/editobject.c | 94 |
1 files changed, 19 insertions, 75 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index d19a53c6ad9..ba350967d45 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -3978,7 +3978,6 @@ void transform(int mode) short pe[3] = {0,0,0}; // again for the same thing. Determines if the period key has been pressed. short mi[3] = {1,1,1}; // same thing again. Determines whether or not the minus key has been pressed (in order to add or substract new numbers). - short drawhelpline = 0; // for new help lines code. float vx[3] = {1,0,0}, vy[3] = {0,1,0}, vz[3] = {0,0,1}; if (mode % 'x' == 0) @@ -4335,7 +4334,10 @@ void transform(int mode) if(G.obedit) calc_trans_verts(); special_trans_update(keyflags); - set_constline_callback(mode, axismode, midtog, centre, imat, vx, vy, vz); + if (cameragrab && midtog) + set_constline_callback(mode, ZTRANSLOCAL, midtog, centre, imat, vx, vy, vz); + else + set_constline_callback(mode, axismode, midtog, centre, imat, vx, vy, vz); if(fast==0) { force_draw(); @@ -5069,95 +5071,37 @@ void transform(int mode) break; case XKEY: - if (drawhelpline==0){ - if (axismode==XTRANS) - axismode=XTRANSLOCAL; - else if (axismode==XTRANSLOCAL) - axismode=0; - else{ - //xref= -xref; - axismode= XTRANS; - } - } - else if (drawhelpline==1){ - if (axismode==XTRANS) - axismode=0; - else{ - axismode= XTRANS; - } - } + if (axismode==XTRANS) + axismode=XTRANSLOCAL; + else if (axismode==XTRANSLOCAL) + axismode=0; else{ - if (axismode==XTRANSLOCAL) - axismode=0; - else{ - axismode=XTRANSLOCAL; - } + axismode= XTRANS; } firsttime=1; break; case YKEY: - if (drawhelpline==0){ - if (axismode==YTRANS) - axismode=YTRANSLOCAL; - else if (axismode==YTRANSLOCAL) - axismode=0; - else{ - //yref= -yref; - axismode= YTRANS; - } - } - else if (drawhelpline==1){ - if (axismode==YTRANS) - axismode=0; - else{ - axismode= YTRANS; - } - } + if (axismode==YTRANS) + axismode=YTRANSLOCAL; + else if (axismode==YTRANSLOCAL) + axismode=0; else{ - if (axismode==YTRANSLOCAL) - axismode=0; - else{ - axismode=YTRANSLOCAL; - } + axismode= YTRANS; } firsttime=1; break; case ZKEY: - if (drawhelpline==0){ - if (axismode==ZTRANS) - axismode=ZTRANSLOCAL; - else if (axismode==ZTRANSLOCAL) - axismode=0; - else{ - //zref= -zref; - axismode= ZTRANS; - } - } - else if (drawhelpline==1){ - if (axismode==ZTRANS) - axismode=0; - else{ - axismode= ZTRANS; - } - } + if (axismode==ZTRANS) + axismode=ZTRANSLOCAL; + else if (axismode==ZTRANSLOCAL) + axismode=0; else{ - if (axismode==ZTRANSLOCAL) - axismode=0; - else{ - axismode=ZTRANSLOCAL; - } + axismode= ZTRANS; } firsttime=1; break; - case LKEY: - // toggle between drawhelpline = 0,1,2 (None, Global, Local) - drawhelpline += 1; - if (drawhelpline==3) drawhelpline = 0; - firsttime = 1; - break; - case WHEELDOWNMOUSE: case PADPLUSKEY: if(G.f & G_PROPORTIONAL) { |