[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59791] trunk/blender/source/blender/ editors/space_view3d/view3d_fly.c: tweaks to fly mode
Jeffrey H
italic.rendezvous at gmail.com
Wed Sep 4 04:31:14 CEST 2013
Agreed. I never use camera fly because it's so difficult to use with my
mouse.
On Tue, Sep 3, 2013 at 7:19 PM, Campbell Barton <ideasman42 at gmail.com>wrote:
> We should probably have FPS style navigation too, as a preference or an
> addon.
>
> On Wed, Sep 4, 2013 at 11:55 AM, Daniel Salazar - 3Developer.com
> <zanqdo at gmail.com> wrote:
> > [Bastard ZanQdo] Does anyone use flight mode? Users have asked numerous
> > times for simple *FPS style navigation* and not this weird momentum
> driven,
> > uncontrollable.. thing. [/Bastard ZanQdo]
> >
> > hugs
> >
> > Daniel Salazar
> > patazstudio.com
> >
> >
> > On Tue, Sep 3, 2013 at 7:49 PM, Campbell Barton <ideasman42 at gmail.com
> >wrote:
> >
> >> Revision: 59791
> >>
> >>
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59791
> >> Author: campbellbarton
> >> Date: 2013-09-04 01:49:20 +0000 (Wed, 04 Sep 2013)
> >> Log Message:
> >> -----------
> >> tweaks to fly mode
> >> - rotating the view is faster.
> >> - arrow keys work (was only wasd-rf before)
> >> - when stationary wheel or +/- will set z direction (so mouse wheel
> always
> >> sets the fly axis back to z)
> >>
> >> Modified Paths:
> >> --------------
> >> trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
> >>
> >> Modified: trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
> >> ===================================================================
> >> --- trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
> >> 2013-09-04 01:29:34 UTC (rev 59790)
> >> +++ trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
> >> 2013-09-04 01:49:20 UTC (rev 59791)
> >> @@ -159,6 +159,11 @@
> >> WM_modalkeymap_add_item(keymap, RKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_DIR_UP);
> >> WM_modalkeymap_add_item(keymap, FKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_DIR_DOWN);
> >>
> >> + WM_modalkeymap_add_item(keymap, UPARROWKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_DIR_FORWARD);
> >> + WM_modalkeymap_add_item(keymap, DOWNARROWKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_DIR_BACKWARD);
> >> + WM_modalkeymap_add_item(keymap, LEFTARROWKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_DIR_LEFT);
> >> + WM_modalkeymap_add_item(keymap, RIGHTARROWKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_DIR_RIGHT);
> >> +
> >> WM_modalkeymap_add_item(keymap, XKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_AXIS_LOCK_X);
> >> WM_modalkeymap_add_item(keymap, ZKEY, KM_PRESS, 0, 0,
> >> FLY_MODAL_AXIS_LOCK_Z);
> >>
> >> @@ -580,6 +585,12 @@
> >> double time_currwheel;
> >> float time_wheel;
> >>
> >> + /* not quite correct but avoids
> confusion
> >> WASD/arrow keys 'locking up' */
> >> + if (fly->axis == -1) {
> >> + fly->axis = 2;
> >> + fly->speed = fabsf(fly->speed);
> >> + }
> >> +
> >> time_currwheel =
> PIL_check_seconds_timer();
> >> time_wheel = (float)(time_currwheel -
> >> fly->time_lastwheel);
> >> fly->time_lastwheel = time_currwheel;
> >> @@ -599,6 +610,12 @@
> >> double time_currwheel;
> >> float time_wheel;
> >>
> >> + /* not quite correct but avoids
> confusion
> >> WASD/arrow keys 'locking up' */
> >> + if (fly->axis == -1) {
> >> + fly->axis = 2;
> >> + fly->speed = -fabsf(fly->speed);
> >> + }
> >> +
> >> time_currwheel =
> PIL_check_seconds_timer();
> >> time_wheel = (float)(time_currwheel -
> >> fly->time_lastwheel);
> >> fly->time_lastwheel = time_currwheel;
> >> @@ -806,9 +823,10 @@
> >>
> >> static int flyApply(bContext *C, FlyInfo *fly)
> >> {
> >> -#define FLY_ROTATE_FAC 2.5f /* more is faster */
> >> +#define FLY_ROTATE_FAC 10.0f /* more is faster */
> >> #define FLY_ZUP_CORRECT_FAC 0.1f /* amount to correct per step */
> >> #define FLY_ZUP_CORRECT_ACCEL 0.05f /* increase upright momentum each
> >> step */
> >> +#define FLY_SMOOTH_FAC 20.0f /* higher value less lag */
> >>
> >> /* fly mode - Shift+F
> >> * a fly loop where the user can move move the view as if they
> are
> >> flying
> >> @@ -1052,7 +1070,7 @@
> >> }
> >>
> >> /* impose a directional lag */
> >> - interp_v3_v3v3(dvec, dvec_tmp, fly->dvec_prev,
> >> (1.0f / (1.0f + (time_redraw * 5.0f))));
> >> + interp_v3_v3v3(dvec, dvec_tmp, fly->dvec_prev,
> >> (1.0f / (1.0f + (time_redraw * FLY_SMOOTH_FAC))));
> >>
> >> if (rv3d->persp == RV3D_CAMOB) {
> >> Object *lock_ob = fly->root_parent ?
> >> fly->root_parent : fly->v3d->camera;
> >>
> >> _______________________________________________
> >> Bf-blender-cvs mailing list
> >> Bf-blender-cvs at blender.org
> >> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
> >>
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-committers
>
>
>
> --
> - Campbell
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
--
Jeffrey "Italic_" Hoover
More information about the Bf-committers
mailing list