[Bf-blender-cvs] [230943be2d0] blender2.8: Fix 3D Cursor w/ interface scale

Campbell Barton noreply at git.blender.org
Fri May 25 10:08:19 CEST 2018


Commit: 230943be2d0bb8cc508f0938003597249a9ddebb
Author: Campbell Barton
Date:   Fri May 25 10:07:28 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB230943be2d0bb8cc508f0938003597249a9ddebb

Fix 3D Cursor w/ interface scale

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

M	source/blender/draw/intern/draw_view.c
M	source/blender/windowmanager/manipulators/intern/wm_manipulator.c

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

diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 2c4e5f8b151..726d77a9925 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -682,7 +682,7 @@ void DRW_draw_cursor(void)
 				immUniformThemeColor3(TH_VIEW_OVERLAY);
 				immBegin(GWN_PRIM_LINES, 12);
 
-				const float scale = ED_view3d_pixel_size(rv3d, cursor->location) * 20;
+				const float scale = ED_view3d_pixel_size_no_ui_scale(rv3d, cursor->location) * U.widget_unit;
 
 #define CURSOR_VERT(axis_vec, axis, fac) \
 				immVertex3f( \
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
index f5a8746f807..5634a1a3ee7 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
@@ -509,7 +509,7 @@ void wm_manipulator_calculate_scale(wmManipulator *mpr, const bContext *C)
 			}
 
 			/* Exclude matrix_offset from scale. */
-			scale *= ED_view3d_pixel_size(rv3d, matrix_world[3]) / U.pixelsize;
+			scale *= ED_view3d_pixel_size_no_ui_scale(rv3d, matrix_world[3]);
 		}
 		else {
 			scale *= 0.02f;



More information about the Bf-blender-cvs mailing list