Gizmo: fix incorrect dial clip scaling
authorCampbell Barton <ideasman42@gmail.com>
Fri, 21 Sep 2018 00:29:29 +0000 (10:29 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 21 Sep 2018 00:30:55 +0000 (10:30 +1000)
Failed with obvious error when the dials scale wasn't 1.0

source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c

index a6252cd55bdd07ac1743fe5be2949efd37934ddb..dfa6c35da2876b71c7386834fbfb040114a548b6 100644 (file)
@@ -367,7 +367,7 @@ static void gizmo_dial_draw_select(const bContext *C, wmGizmo *gz, int select_id
 
                copy_v3_v3(clip_plane, rv3d->viewinv[2]);
                clip_plane[3] = -dot_v3v3(rv3d->viewinv[2], gz->matrix_basis[3]);
-               clip_plane[3] += DIAL_CLIP_BIAS * gz->scale_final;
+               clip_plane[3] += DIAL_CLIP_BIAS;
                glEnable(GL_CLIP_DISTANCE0);
        }
 
@@ -393,7 +393,7 @@ static void gizmo_dial_draw(const bContext *C, wmGizmo *gz)
 
                copy_v3_v3(clip_plane, rv3d->viewinv[2]);
                clip_plane[3] = -dot_v3v3(rv3d->viewinv[2], gz->matrix_basis[3]);
-               clip_plane[3] += DIAL_CLIP_BIAS * gz->scale_final;
+               clip_plane[3] += DIAL_CLIP_BIAS;
 
                glEnable(GL_CLIP_DISTANCE0);
        }