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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-12-09 17:31:39 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-14 14:13:55 +0300
commitcc55f97da9cca7a27f2313b7405d3aad277029d7 (patch)
tree0dd6047408ec255772dac4a9b79a6e50edcc1990 /source/blender/compositor/operations/COM_BlurBaseOperation.cpp
parent73feae6f5dd81a81e0321db80e55c15c3518b7a0 (diff)
Compositor: Add option to extend image bounds when blurring
It is handy when doing some roto work and it's required to blur some mask or overaly before alpha-overing it on top of the footage. Quite straightforward option with the only limitation that variable size blur is not supported. Reviewers: campbellbarton Subscribers: hype, sebastian_k Differential Revision: https://developer.blender.org/D1663
Diffstat (limited to 'source/blender/compositor/operations/COM_BlurBaseOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index dc5f80e55f3..2003d6e7b69 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -39,6 +39,7 @@ BlurBaseOperation::BlurBaseOperation(DataType data_type) : NodeOperation()
memset(&m_data, 0, sizeof(NodeBlurData));
this->m_size = 1.0f;
this->m_sizeavailable = false;
+ this->m_extend_bounds = false;
}
void BlurBaseOperation::initExecution()
{
@@ -174,3 +175,14 @@ void BlurBaseOperation::updateSize()
this->m_sizeavailable = true;
}
}
+
+void BlurBaseOperation::determineResolution(unsigned int resolution[2],
+ unsigned int preferredResolution[2])
+{
+ NodeOperation::determineResolution(resolution,
+ preferredResolution);
+ if (this->m_extend_bounds) {
+ resolution[0] += 2 * this->m_size * m_data.sizex;
+ resolution[1] += 2 * this->m_size * m_data.sizey;
+ }
+}