diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-21 17:24:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-21 19:00:48 +0300 |
commit | 19488ee125734c616559a6ad94369bc28feddc7e (patch) | |
tree | b8c7cae0e0691b31452e79d89f66dd5c0aa7725e /intern/cycles/blender | |
parent | a887e1ea436f14762d9b768ba2d394b7afab4ee9 (diff) |
Fix (harmless) Cycles ASAN warnings
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_camera.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp index 92dc8a8a4c6..da43f94708c 100644 --- a/intern/cycles/blender/blender_camera.cpp +++ b/intern/cycles/blender/blender_camera.cpp @@ -91,16 +91,31 @@ static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings &b_rende { memset((void *)bcam, 0, sizeof(BlenderCamera)); + bcam->nearclip = 1e-5f; + bcam->farclip = 1e5f; + bcam->type = CAMERA_PERSPECTIVE; + bcam->ortho_scale = 1.0f; + + bcam->lens = 50.0f; + bcam->shuttertime = 1.0f; + + bcam->rolling_shutter_type = Camera::ROLLING_SHUTTER_NONE; + bcam->rolling_shutter_duration = 0.1f; + + bcam->aperturesize = 0.0f; + bcam->apertureblades = 0; + bcam->aperturerotation = 0.0f; + bcam->focaldistance = 10.0f; + bcam->zoom = 1.0f; bcam->pixelaspect = make_float2(1.0f, 1.0f); + bcam->aperture_ratio = 1.0f; + bcam->sensor_width = 36.0f; bcam->sensor_height = 24.0f; bcam->sensor_fit = BlenderCamera::AUTO; - bcam->shuttertime = 1.0f; bcam->motion_position = Camera::MOTION_POSITION_CENTER; - bcam->rolling_shutter_type = Camera::ROLLING_SHUTTER_NONE; - bcam->rolling_shutter_duration = 0.1f; bcam->border.right = 1.0f; bcam->border.top = 1.0f; bcam->pano_viewplane.right = 1.0f; @@ -108,6 +123,7 @@ static void blender_camera_init(BlenderCamera *bcam, BL::RenderSettings &b_rende bcam->viewport_camera_border.right = 1.0f; bcam->viewport_camera_border.top = 1.0f; bcam->offscreen_dicing_scale = 1.0f; + bcam->matrix = transform_identity(); /* render resolution */ bcam->full_width = render_resolution_x(b_render); |