diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-12 12:24:30 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-12 12:24:30 +0400 |
commit | 9c0eecbf102cf1e39a5a5374a0d1bd4f60cfbddb (patch) | |
tree | fb7d00f0fa873c81ca33a4fa66ffc94a93e20ffd /source/blender | |
parent | 5792e77239c43aea0afc21b2df96153ba31c5399 (diff) |
Fix #34599: Mask nodes stop working if output is later piped through HSV node
Issue was caused by the fix for #33650 which changed way to check whether
operation resolution is set or not from checking dimensions are zero to
setResolution was ever called.
Such change lead to conflict with MixBase operation (used for Mix node) which
uses temporary zero resolution to check whether input socket resolution is
known. This leads to zero resolution setting to that branch of tree. After this
resolution will never set to it's actual value.
For now solved by changing logic how MixBase operation detects resolution.
Namely instead of using trick with temporary zero resolution and calling
determineResolution for all inputs, and then call base class's method to
determine resolution just once again, check whether input socket is connected
and if so use it's resolution.
Shall not be regressions for real-life trees, but keeping an eye on this and
doing more tests is for sure welcome.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/compositor/operations/COM_MixBaseOperation.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.cpp b/source/blender/compositor/operations/COM_MixBaseOperation.cpp index 2d40629e764..5e3dbc2eaa3 100644 --- a/source/blender/compositor/operations/COM_MixBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_MixBaseOperation.cpp @@ -72,21 +72,11 @@ void MixBaseOperation::deinitExecution() void MixBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) { - InputSocket *socket; - unsigned int tempPreferredResolution[2] = {0, 0}; - unsigned int tempResolution[2]; - - socket = this->getInputSocket(1); - socket->determineResolution(tempResolution, tempPreferredResolution); - if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) { + if (this->getInputSocket(1)->isConnected()) { this->setResolutionInputSocketIndex(1); } else { - socket = this->getInputSocket(2); - tempPreferredResolution[0] = 0; - tempPreferredResolution[1] = 0; - socket->determineResolution(tempResolution, tempPreferredResolution); - if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) { + if (this->getInputSocket(2)->isConnected()) { this->setResolutionInputSocketIndex(2); } else { |