diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-01-11 03:05:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-01-11 03:05:36 +0300 |
commit | fa4b04a2105af8647ad277210fe9a904bb1c8126 (patch) | |
tree | 0d8a68abde43deb2907b11abc1ad3c8ce18bf0a7 /source/blender/src/editview.c | |
parent | f7708a2692dfc260d2fa9f00b0c3ec967a1ce23f (diff) |
Fly mode now detects weather Z is up to start with and sets the initial Z locking from this.
Diffstat (limited to 'source/blender/src/editview.c')
-rw-r--r-- | source/blender/src/editview.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index ada7f961dca..dfa638ce343 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -2151,6 +2151,13 @@ void fly(void) } + /* detect weather to start with Z locking */ + upvec[0]=1; upvec[1]=0; upvec[2]=0; + Mat3MulVecfl(G.vd->viewinv, upvec); + if (fabs(upvec[2]) < 0.1) + zlock = 1; + upvec[0]=0; upvec[1]=0; upvec[2]=0; + persp_backup= G.vd->persp; dist_backup= G.vd->dist; if (G.vd->persp==2) { /* Camera */ @@ -2448,7 +2455,14 @@ void fly(void) dvec[2] = dvec_tmp[2]*(1-dvec_lag) + dvec_old[2]*dvec_lag; VecAddf(G.vd->ofs, G.vd->ofs, dvec); - headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X/Z, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); + if (zlock && xlock) + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X on/Z on, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); + else if (zlock) + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X off/Z on, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); + else if (xlock) + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X on/Z off, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); + else + headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X off/Z off, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); do_screenhandlers(G.curscreen); /* advance the next frame */ |