From ac5a735e3fe9fe29e38e3a20c20da87b27feb112 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 12 Jun 2012 04:23:21 +0000 Subject: * FIX for - [#31777] Border Crop gives black - [#31768] Crash when connecting a Math node to a translate node in Tiles comp - [#31638] View node in new node compo system crashes when inside a group * make sure a very fast vignette can be made by using a EliipseMask + Fast Gaussian blur --- .../compositor/operations/COM_CompositorOperation.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'source/blender/compositor/operations/COM_CompositorOperation.cpp') diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index d75cb39325f..c6e8faaa638 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -102,7 +102,7 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber, Mem int y1 = rect->ymin; int x2 = rect->xmax; int y2 = rect->ymax; - int offset = (y1*this->getWidth() + x1 ) * 4; + int offset = (y1*this->getWidth() + x1 ) * COM_NUMBER_OF_CHANNELS; int x; int y; bool breaked = false; @@ -117,12 +117,12 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber, Mem buffer[offset+1] = color[1]; buffer[offset+2] = color[2]; buffer[offset+3] = color[3]; - offset +=4; + offset +=COM_NUMBER_OF_CHANNELS; if (tree->test_break && tree->test_break(tree->tbh)) { breaked = true; } } - offset += (this->getWidth()-(x2-x1))*4; + offset += (this->getWidth()-(x2-x1))*COM_NUMBER_OF_CHANNELS; } } @@ -130,6 +130,19 @@ void CompositorOperation::determineResolution(unsigned int resolution[], unsigne { int width = this->scene->r.xsch*this->scene->r.size/100; int height = this->scene->r.ysch*this->scene->r.size/100; + + // check actual render resolution with cropping it may differ with cropped border.rendering + // FIX for: [31777] Border Crop gives black (easy) + Render *re= RE_GetRender(this->scene->id.name); + if (re) { + RenderResult *rr= RE_AcquireResultRead(re); + if (rr) { + width = rr->rectx; + height = rr->recty; + } + RE_ReleaseResult(re); + } + preferredResolution[0] = width; preferredResolution[1] = height; -- cgit v1.2.3