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
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-06-12 08:23:21 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-12 08:23:21 +0400
commitac5a735e3fe9fe29e38e3a20c20da87b27feb112 (patch)
tree52059f3dbc9827eb498abe772e763e541b3b3608 /source/blender/compositor/operations/COM_CompositorOperation.cpp
parent7977078227d6da77e294dd860f4685387f0bae56 (diff)
* 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
Diffstat (limited to 'source/blender/compositor/operations/COM_CompositorOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cpp19
1 files changed, 16 insertions, 3 deletions
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;