Fix T67641 Gizmo3D: Transform gizmo disappear in very close view

This was caused but a workaround for not selecting the gizmos in camera
view. We lower the threshold to make it work on maximum zoom level.
This commit is contained in:
Clément Foucault
2020-02-05 00:04:45 +01:00
parent 78ba097331
commit 79003fa0c4

View File

@@ -1862,7 +1862,7 @@ static void WIDGETGROUP_gizmo_draw_prepare(const bContext *C, wmGizmoGroup *gzgr
/* when looking through a selected camera, the gizmo can be at the
* exact same position as the view, skip so we don't break selection */
if (ggd->all_hidden || fabsf(ED_view3d_pixel_size(rv3d, rv3d->twmat[3])) < 1e-6f) {
if (ggd->all_hidden || fabsf(ED_view3d_pixel_size(rv3d, rv3d->twmat[3])) < 5e-7f) {
MAN_ITER_AXES_BEGIN (axis, axis_idx) {
WM_gizmo_set_flag(axis, WM_GIZMO_HIDDEN, true);
}