[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55204] trunk/blender/source/blender/ compositor/operations/COM_MixBaseOperation.cpp: Fix #34599: Mask nodes stop working if output is later piped through HSV node

Sergey Sharybin sergey.vfx at gmail.com
Tue Mar 12 09:24:30 CET 2013


Revision: 55204
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55204
Author:   nazgul
Date:     2013-03-12 08:24:30 +0000 (Tue, 12 Mar 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp

Modified: trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp	2013-03-12 07:25:53 UTC (rev 55203)
+++ trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp	2013-03-12 08:24:30 UTC (rev 55204)
@@ -72,21 +72,11 @@
 
 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 {




More information about the Bf-blender-cvs mailing list