Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-03-05 07:07:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-05 07:42:01 +0300
commitda0176614b37315df7aaf6243c80d5c66a7ca4dc (patch)
tree43f09bfb231244c4d888ef93d41fb99f5a5d207d /intern
parent1e817cceb013280fa4e20827038c1c8c3cae741e (diff)
Fix T43672: Cycles preview stalls when out of view
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/blender_camera.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp
index 16f555cb58c..dee9ee09fc6 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);