[Bf-blender-cvs] [96ed2b0] master: Remove sensor-size to int conversion

Campbell Barton noreply at git.blender.org
Mon Nov 28 07:18:55 CET 2016


Commit: 96ed2b0ce05ae46d81c38476133768d8b07fdc71
Author: Campbell Barton
Date:   Mon Nov 28 17:29:27 2016 +1100
Branches: master
https://developer.blender.org/rB96ed2b0ce05ae46d81c38476133768d8b07fdc71

Remove sensor-size to int conversion

Currently harmless since the value is always set at its default (32).
Even so, it's confusing since its used with floats after.

===================================================================

M	source/blender/blenkernel/intern/camera.c

===================================================================

diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 85ce399..30f1758 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -252,7 +252,7 @@ void BKE_camera_params_from_view3d(CameraParams *params, const View3D *v3d, cons
 	}
 	else if (rv3d->persp == RV3D_ORTHO) {
 		/* orthographic view */
-		int sensor_size = BKE_camera_sensor_size(params->sensor_fit, params->sensor_x, params->sensor_y);
+		float sensor_size = BKE_camera_sensor_size(params->sensor_fit, params->sensor_x, params->sensor_y);
 		params->clipend *= 0.5f;    // otherwise too extreme low zbuffer quality
 		params->clipsta = -params->clipend;




More information about the Bf-blender-cvs mailing list