Gizmo: update camera ortho-size
authorCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2018 02:19:44 +0000 (13:19 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2018 02:19:44 +0000 (13:19 +1100)
This needs to be improved further,
for now it shows in the right location.

source/blender/editors/space_view3d/view3d_gizmo_camera.c

index c80a11cbf16bb67ab039ce9c5f1b85f33214aec4..0dcffbbdcb0bfd6dbafecb78f7618a0ab99387b4 100644 (file)
@@ -221,7 +221,7 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmGizmoGroup *gzgroup)
 
                ED_gizmo_arrow3d_set_range_fac(
                        widget, is_ortho ?
-                       (ca->drawsize * range) :
+                       ((range / scale_matrix) * ca->drawsize) :
                        (scale_matrix * range /
                         /* Half sensor, intentionally use sensor from camera and not calculated above. */
                         (0.5f * ((sensor_fit == CAMERA_SENSOR_FIT_HOR) ? ca->sensor_x : ca->sensor_y))));