Fix T48526: Cycles viewport render incorrectly influenced by pixel aspect ratio.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 28 May 2016 09:54:08 +0000 (11:54 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 28 May 2016 09:57:27 +0000 (11:57 +0200)
This reverts 72592cfb, needs more refactoring to do that cleanup.

intern/cycles/blender/blender_camera.cpp

index 9dec489ce336485a34fca368c47b08eb6ef88fe5..3a0fee23c0dd30aff29033fca34fb499c91b9e1a 100644 (file)
@@ -108,10 +108,6 @@ static void blender_camera_init(BlenderCamera *bcam,
        /* render resolution */
        bcam->full_width = render_resolution_x(b_render);
        bcam->full_height = render_resolution_y(b_render);
-
-       /* pixel aspect */
-       bcam->pixelaspect.x = b_render.pixel_aspect_x();
-       bcam->pixelaspect.y = b_render.pixel_aspect_y();
 }
 
 static float blender_camera_focal_distance(BL::RenderEngine& b_engine,
@@ -563,6 +559,10 @@ void BlenderSync::sync_camera_motion(BL::RenderSettings& b_render,
                float aspectratio, sensor_size;
                blender_camera_init(&bcam, b_render);
 
+               /* TODO(sergey): Consider making it a part of blender_camera_init(). */
+               bcam.pixelaspect.x = b_render.pixel_aspect_x();
+               bcam.pixelaspect.y = b_render.pixel_aspect_y();
+
                blender_camera_from_object(&bcam, b_engine, b_ob);
                blender_camera_viewplane(&bcam,
                                         width, height,