Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-04-29 09:17:55 +0300
committerCampbell Barton <campbell@blender.org>2022-04-29 09:21:23 +0300
commitcc8fe1a1cbc63db66c038773b070dca14e82cebb (patch)
tree9109ade6afb2c01677d545b846773ec270a5f215 /source/blender/windowmanager/gizmo
parent7f0163118bb702afe143fe0aa55210cc10c43512 (diff)
Fix T97120: Gizmo fails to select in orthographic view
Regression in exposed by 49fc4449e734842cc3ccd797e6ece73ea64f34e4.
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index 290912f1c97..a61d73b9f0b 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -649,7 +649,7 @@ static int gizmo_find_intersected_3d_intern(wmGizmo **visible_gizmos,
BLI_assert(buf_iter->id != -1);
wmGizmo *gz = visible_gizmos[buf_iter->id >> 8];
float co_3d[3];
- co_screen[2] = int_as_float(buf_iter->depth);
+ co_screen[2] = (float)((double)buf_iter->depth / (double)UINT_MAX);
GPU_matrix_unproject_3fv(co_screen, rv3d->viewinv, rv3d->winmat, viewport, co_3d);
float select_bias = gz->select_bias;
if ((gz->flag & WM_GIZMO_DRAW_NO_SCALE) == 0) {