[Bf-blender-cvs] [dd9cedddae6] master: 3D View: only calculate view center when needed

Campbell Barton noreply at git.blender.org
Thu Feb 28 05:41:53 CET 2019


Commit: dd9cedddae69abf9412d8e961d599875b596eb33
Author: Campbell Barton
Date:   Thu Feb 28 15:40:28 2019 +1100
Branches: master
https://developer.blender.org/rBdd9cedddae69abf9412d8e961d599875b596eb33

3D View: only calculate view center when needed

When orbit around selection was enabled the selection center was being
calculated even when it wasn't needed.

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

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 c84e8d9da20..eeb34bde66d 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1701,7 +1701,7 @@ static int viewmove_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 	viewops_data_alloc(C, op);
 	viewops_data_create(
 	        C, op, event,
-	        viewops_flag_from_prefs() |
+	        (viewops_flag_from_prefs() & ~VIEWOPS_FLAG_ORBIT_SELECT) |
 	        (use_mouse_init ? VIEWOPS_FLAG_USE_MOUSE_INIT : 0));
 	vod = op->customdata;
 
@@ -2198,7 +2198,7 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 	viewops_data_alloc(C, op);
 	viewops_data_create(
 	        C, op, event,
-	        viewops_flag_from_prefs() |
+	        (viewops_flag_from_prefs() & ~VIEWOPS_FLAG_ORBIT_SELECT) |
 	        (use_mouse_init ? VIEWOPS_FLAG_USE_MOUSE_INIT : 0));
 	vod = op->customdata;
 
@@ -2515,7 +2515,7 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 
 	viewops_data_create(
 	        C, op, event,
-	        viewops_flag_from_prefs() |
+	        (viewops_flag_from_prefs() & ~VIEWOPS_FLAG_ORBIT_SELECT) |
 	        (use_mouse_init ? VIEWOPS_FLAG_USE_MOUSE_INIT : 0));
 
 
@@ -4299,7 +4299,7 @@ static int viewpan_invoke(bContext *C, wmOperator *op, const wmEvent *event)
 	else if (pandir == V3D_VIEW_PANDOWN)   { y =  25; }
 
 	viewops_data_alloc(C, op);
-	viewops_data_create(C, op, event, viewops_flag_from_prefs());
+	viewops_data_create(C, op, event, (viewops_flag_from_prefs() & ~VIEWOPS_FLAG_ORBIT_SELECT));
 	ViewOpsData *vod = op->customdata;
 
 	viewmove_apply(vod, vod->prev.event_xy[0] + x, vod->prev.event_xy[1] + y);



More information about the Bf-blender-cvs mailing list