Skip to content

Commit

Permalink
Update Renderer.cpp
Browse files Browse the repository at this point in the history
crop window support for interactive and local renders
  • Loading branch information
murraystevenson authored Oct 26, 2019
1 parent 3fd0566 commit ca96159
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/GafferCycles/IECoreCyclesPreview/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ class CyclesOutput : public IECore::RefCounted
V2i( camera->width - 1, camera->height - 1 )
);
Box2i dataWindow(
V2i( 0, 0 ),
V2i( camera->width - 1, camera->height - 1 )
V2i( (int)(camera->border.left * (float)camera->width), (int)(camera->border.bottom * (float)camera->height) ),
V2i( (int)(camera->border.right * (float)camera->width) - 1, (int)(camera->border.top * (float)camera->height - 1 ) )
);

vector<string> channelNames;
Expand Down Expand Up @@ -499,8 +499,8 @@ class RenderCallback : public IECore::RefCounted
V2i( camera->width - 1, camera->height - 1 )
);
Box2i dataWindow(
V2i( 0, 0 ),
V2i( camera->width - 1, camera->height - 1 )
V2i( (int)(camera->border.left * (float)camera->width), (int)(camera->border.bottom * (float)camera->height) ),
V2i( (int)(camera->border.right * (float)camera->width) - 1, (int)(camera->border.top * (float)camera->height - 1 ) )
);

//CompoundDataPtr parameters = new CompoundData();
Expand Down Expand Up @@ -618,8 +618,8 @@ class RenderCallback : public IECore::RefCounted
IECore::msg( IECore::Msg::Warning, "CyclesRenderer::CyclesOutput", "No interactive outputs to render to." );
return;
}
const int x = rtile.x - m_session->tile_manager.params.full_x;
const int y = rtile.y - m_session->tile_manager.params.full_y;
const int x = rtile.x;
const int y = rtile.y;
const int w = rtile.w;
const int h = rtile.h;

Expand Down

0 comments on commit ca96159

Please sign in to comment.