diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-04-05 17:35:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-04-05 17:35:05 +0400 |
commit | 6adecec7c197b20d397be94c63758de6fc17a68d (patch) | |
tree | dccdaeba212b74e6eab080b2dce376215f71abf6 /source | |
parent | bbceedced0ecf1426d90faf5f36136f688853ab6 (diff) |
respect location protect flags, makes reviewing models on terrain much nicer because you can lock the Z and look down on them while moving around.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/editview.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index 3b59b2fbd74..6dfdd3cf1c0 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -115,7 +115,7 @@ extern ListBase editNurb; /* originally from exports.h, memory from editcurve.c* /* editmball.c */ extern ListBase editelems; -/* fly mode ises this */ +/* fly mode uses this */ extern void setcameratoview3d(void); /* local prototypes */ @@ -2141,7 +2141,6 @@ void fly(void) int cfra = -1; /*so the first frame always has a key added */ char *actname=""; - if(curarea->spacetype!=SPACE_VIEW3D) return; if(G.vd->persp==2 && G.vd->camera->id.lib) { @@ -2458,6 +2457,16 @@ void fly(void) dvec[1] = dvec_tmp[1]*(1-dvec_lag) + dvec_old[1]*dvec_lag; dvec[2] = dvec_tmp[2]*(1-dvec_lag) + dvec_old[2]*dvec_lag; + + if (G.vd->persp==2) { + if (G.vd->camera->protectflag & OB_LOCK_LOCX) + dvec[0] = 0.0; + if (G.vd->camera->protectflag & OB_LOCK_LOCY) + dvec[1] = 0.0; + if (G.vd->camera->protectflag & OB_LOCK_LOCZ) + dvec[2] = 0.0; + } + VecAddf(G.vd->ofs, G.vd->ofs, dvec); if (zlock && xlock) headerprint("FlyKeys Speed:(+/- | Wheel), Upright Axis:X on/Z on, Slow:Shift, Direction:WASDRF, Ok:LMB, Pan:MMB, Cancel:RMB"); |