diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_WriteBufferOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_WriteBufferOperation.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp index 17c8f4d9fd1..f18493dc334 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp @@ -174,6 +174,21 @@ void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect, delete clKernelsToCleanUp; } +void WriteBufferOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +{ + NodeOperation::determineResolution(resolution, preferredResolution); + /* make sure there is at least one pixel stored in case the input is a single value */ + m_single_value = false; + if (resolution[0] == 0) { + resolution[0] = 1; + m_single_value = true; + } + if (resolution[1] == 0) { + resolution[1] = 1; + m_single_value = true; + } +} + void WriteBufferOperation::readResolutionFromInputSocket() { NodeOperation *inputOperation = this->getInputOperation(0); |