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:
authorMonique Dewanchand <m.dewanchand@atmind.nl>2012-06-01 00:26:42 +0400
committerMonique Dewanchand <m.dewanchand@atmind.nl>2012-06-01 00:26:42 +0400
commit13714e621d654f64a2b8c6f2772ffcb0ab101dd2 (patch)
tree2747ac9c8159e1efff8cdca3d0841b28af0388bc /source/blender/compositor/operations/COM_MathBaseOperation.cpp
parent2b5eed9689679200033dd2e713fc506126423fb2 (diff)
Fix for [#31662] Compositing: No Alpha if image/color connected to second input of math node
Diffstat (limited to 'source/blender/compositor/operations/COM_MathBaseOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
index 3a287cb7239..2ea5f85253b 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -47,6 +47,22 @@ void MathBaseOperation::deinitExecution()
this->inputValue2Operation = NULL;
}
+void MathBaseOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
+{
+ InputSocket *socket;
+ unsigned int tempPreferredResolution[] = {0,0};
+ unsigned int tempResolution[2];
+
+ socket = this->getInputSocket(0);
+ socket->determineResolution(tempResolution, tempPreferredResolution);
+ if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
+ this->setResolutionInputSocketIndex(0);
+ } else {
+ this->setResolutionInputSocketIndex(1);
+ }
+ NodeOperation::determineResolution(resolution, preferredResolution);
+}
+
void MathAddOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float inputValue1[4];