diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-04 19:01:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-04 19:01:18 +0300 |
commit | 6601680e8dbde4cd370514248a05480ba2ef6951 (patch) | |
tree | d60f898dcf2ce921b6e71d14fb15abb828ad67fb /source/blender/editors/space_view3d/view3d_edit.c | |
parent | bd1378b56beba66442e0d55685bd1136e971f5ad (diff) |
View3D: apply smoothview before modal view operations
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 66789e466d4..0c05e85631f 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -1229,6 +1229,8 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_PASS_THROUGH; } + ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->ar); + /* switch from camera view when: */ if (view3d_ensure_persp(vod->v3d, vod->ar)) { /* If we're switching from camera view to the perspective one, @@ -1648,6 +1650,8 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *op, const wmEvent *event) viewops_data_create_ex(C, op, event, (U.uiflag & USER_ORBIT_SELECTION) != 0, false); + ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->ar); + vod = op->customdata; v3d = vod->v3d; rv3d = vod->rv3d; @@ -1714,6 +1718,8 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev viewops_data_create_ex(C, op, event, (U.uiflag & USER_ORBIT_SELECTION) != 0, false); + ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->ar); + vod = op->customdata; v3d = vod->v3d; rv3d = vod->rv3d; @@ -2024,6 +2030,8 @@ static int viewmove_invoke(bContext *C, wmOperator *op, const wmEvent *event) viewops_data_create(C, op, event); vod = op->customdata; + ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->ar); + if (event->type == MOUSEPAN) { /* invert it, trackpad scroll follows same principle as 2d windows this way */ viewmove_apply(vod, 2 * event->x - event->prevx, 2 * event->y - event->prevy); @@ -2503,6 +2511,8 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, const wmEvent *event) viewops_data_create(C, op, event); vod = op->customdata; + ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->ar); + /* if one or the other zoom position aren't set, set from event */ if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) { RNA_int_set(op->ptr, "mx", event->x); @@ -2743,6 +2753,8 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_PASS_THROUGH; } + ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->ar); + /* needs to run before 'viewops_data_create' so the backup 'rv3d->ofs' is correct */ /* switch from camera view when: */ if (vod->rv3d->persp != RV3D_PERSP) { @@ -4260,6 +4272,8 @@ static int viewroll_invoke(bContext *C, wmOperator *op, const wmEvent *event) viewops_data_create(C, op, event); vod = op->customdata; + ED_view3d_smooth_view_force_finish(C, vod->v3d, vod->ar); + /* overwrite the mouse vector with the view direction */ normalize_v3_v3(vod->mousevec, vod->rv3d->viewinv[2]); negate_v3(vod->mousevec); |