Commit: da0176614b37315df7aaf6243c80d5c66a7ca4dc
Author: Campbell Barton
Date:   Thu Mar 5 15:07:21 2015 +1100
Branches: master
https://developer.blender.org/rBda0176614b37315df7aaf6243c80d5c66a7ca4dc

Fix T43672: Cycles preview stalls when out of view

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

M       intern/cycles/blender/blender_camera.cpp

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

diff --git a/intern/cycles/blender/blender_camera.cpp 
b/intern/cycles/blender/blender_camera.cpp
index 16f555c..dee9ee0 100644
--- a/intern/cycles/blender/blender_camera.cpp
+++ b/intern/cycles/blender/blender_camera.cpp
@@ -623,10 +623,12 @@ BufferParams 
BlenderSync::get_buffer_params(BL::RenderSettings b_render, BL::Sce
 
        if(use_border) {
                /* border render */
-               params.full_x = (int)(cam->border.left * (float)width);
-               params.full_y = (int)(cam->border.bottom * (float)height);
-               params.width = (int)(cam->border.right * (float)width) - 
params.full_x;
-               params.height = (int)(cam->border.top * (float)height) - 
params.full_y;
+               /* the viewport may offset the border outside the view */
+               BoundBox2D border = cam->border.clamp();
+               params.full_x = (int)(border.left * (float)width);
+               params.full_y = (int)(border.bottom * (float)height);
+               params.width = (int)(border.right * (float)width) - 
params.full_x;
+               params.height = (int)(border.top * (float)height) - 
params.full_y;
 
                /* survive in case border goes out of view or becomes too small 
*/
                params.width = max(params.width, 1);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to