Fix T90658: selection of some 3D gizmos failing

Small error due to wrong variable usage.

Introduced in rBfcd2d63b644e.
This commit is contained in:
Germano Cavalcante 2021-08-15 17:54:59 -03:00
parent d5261e973b
commit 3f0d785d23
Notes: blender-bot 2023-10-12 12:49:04 +02:00
Referenced by issue #90692, UI/Gizmo: Impossible to execute axis-aligned extrude using gizmo
Referenced by issue #90658, Using center of gizmo for translation is inconsistent based on viewing angle.
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ static int gizmo_find_intersected_3d_intern(wmGizmo **visible_gizmos,
wmGizmo *gz = visible_gizmos[buf_iter[3] >> 8];
float co_3d[3];
co_screen[2] = int_as_float(buf_iter[1]);
GPU_matrix_unproject_3fv(co_screen, rv3d->viewinv, rv3d->winmat, viewport, co_3d_origin);
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) {
select_bias *= gz->scale_final;