[Bf-blender-cvs] [6601680] master: View3D: apply smoothview before modal view operations

Campbell Barton noreply at git.blender.org
Wed May 4 17:57:35 CEST 2016


Commit: 6601680e8dbde4cd370514248a05480ba2ef6951
Author: Campbell Barton
Date:   Thu May 5 02:01:18 2016 +1000
Branches: master
https://developer.blender.org/rB6601680e8dbde4cd370514248a05480ba2ef6951

View3D: apply smoothview before modal view operations

===================================================================

M	source/blender/editors/space_view3d/view3d_edit.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 66789e4..0c05e85 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);




More information about the Bf-blender-cvs mailing list