diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-22 17:11:38 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-22 17:11:38 +0400 |
commit | f73e023e54923890bdfd2e5f81a3d13866413f75 (patch) | |
tree | 98252d403fa54db74d13bf0e19eb6bcd83071245 | |
parent | 35bc9b612d12f4b673cd76bf70dfacba28b5671b (diff) |
* fix for [#31553] Tile Compositor: Strange seams
-rw-r--r-- | source/blender/compositor/operations/COM_CombineChannelsOperation.cpp | 27 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_CombineChannelsOperation.h | 2 |
2 files changed, 28 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp index dff8ccf7e73..fb4e6f03e76 100644 --- a/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp +++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp @@ -21,7 +21,7 @@ */ #include "COM_CombineChannelsOperation.h" -#include <stdio.h> +#include "BLI_utildefines.h" CombineChannelsOperation::CombineChannelsOperation() : NodeOperation() { @@ -36,6 +36,31 @@ CombineChannelsOperation::CombineChannelsOperation() : NodeOperation() this->inputChannel3Operation = NULL; this->inputChannel4Operation = NULL; } + +bool CombineChannelsOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +{ + rcti tempOutput; + bool first = true; + for (int i = 0 ; i < 4 ; i ++) { + NodeOperation * inputOperation = this->getInputOperation(i); + if (inputOperation->determineDependingAreaOfInterest(input, readOperation, &tempOutput)) { + if (first) { + output->xmin = tempOutput.xmin; + output->ymin = tempOutput.ymin; + output->xmax = tempOutput.xmax; + output->ymax = tempOutput.ymax; + first = false; + } else { + output->xmin = MIN2(output->xmin, tempOutput.xmin); + output->ymin = MIN2(output->ymin, tempOutput.ymin); + output->xmax = MAX2(output->xmax, tempOutput.xmax); + output->ymax = MAX2(output->ymax, tempOutput.ymax); + } + } + } + return !first; +} + void CombineChannelsOperation::initExecution() { this->inputChannel1Operation = this->getInputSocketReader(0); diff --git a/source/blender/compositor/operations/COM_CombineChannelsOperation.h b/source/blender/compositor/operations/COM_CombineChannelsOperation.h index d2977155e14..cc71f44b4f5 100644 --- a/source/blender/compositor/operations/COM_CombineChannelsOperation.h +++ b/source/blender/compositor/operations/COM_CombineChannelsOperation.h @@ -37,6 +37,8 @@ public: void initExecution(); void deinitExecution(); + + bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); }; #endif |