[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46350] branches/tile/source/blender/ compositor: TileBranch
Jeroen Bakker
j.bakker at atmind.nl
Sun May 6 15:49:12 CEST 2012
Revision: 46350
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46350
Author: jbakker
Date: 2012-05-06 13:49:12 +0000 (Sun, 06 May 2012)
Log Message:
-----------
TileBranch
* fix for [#31313] Fast Gaussian - NO result & Mix node - NO preview
Modified Paths:
--------------
branches/tile/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
branches/tile/source/blender/compositor/nodes/COM_MixNode.cpp
branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.cpp
branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.h
Modified: branches/tile/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
===================================================================
--- branches/tile/source/blender/compositor/nodes/COM_DilateErodeNode.cpp 2012-05-06 13:41:27 UTC (rev 46349)
+++ branches/tile/source/blender/compositor/nodes/COM_DilateErodeNode.cpp 2012-05-06 13:49:12 UTC (rev 46350)
@@ -25,6 +25,7 @@
#include "COM_ExecutionSystem.h"
#include "COM_DilateErodeOperation.h"
#include "COM_AntiAliasOperation.h"
+#include "BLI_math.h"
DilateErodeNode::DilateErodeNode(bNode *editorNode): Node(editorNode) {
}
@@ -33,8 +34,8 @@
bNode* editorNode = this->getbNode();
DilateErodeOperation *operation = new DilateErodeOperation();
operation->setDistance(editorNode->custom2);
- operation->setInset(0.0f);
-
+ operation->setInset(2.0f);
+
this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0));
AntiAliasOperation * antiAlias = new AntiAliasOperation();
Modified: branches/tile/source/blender/compositor/nodes/COM_MixNode.cpp
===================================================================
--- branches/tile/source/blender/compositor/nodes/COM_MixNode.cpp 2012-05-06 13:41:27 UTC (rev 46349)
+++ branches/tile/source/blender/compositor/nodes/COM_MixNode.cpp 2012-05-06 13:49:12 UTC (rev 46350)
@@ -118,13 +118,6 @@
break;
}
convertProg->setUseValueAlphaMultiply(this->getbNode()->custom2);
- if (color1Socket->isConnected()) {
- convertProg->setResolutionInputSocketIndex(1);
- } else if (color2Socket->isConnected()) {
- convertProg->setResolutionInputSocketIndex(2);
- } else {
- convertProg->setResolutionInputSocketIndex(0);
- }
valueSocket->relinkConnections(convertProg->getInputSocket(0), true, 0, graph);
color1Socket->relinkConnections(convertProg->getInputSocket(1), true, 1, graph);
color2Socket->relinkConnections(convertProg->getInputSocket(2), true, 2, graph);
Modified: branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.cpp
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.cpp 2012-05-06 13:41:27 UTC (rev 46349)
+++ branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.cpp 2012-05-06 13:49:12 UTC (rev 46350)
@@ -64,3 +64,32 @@
this->inputColor2Operation = NULL;
}
+void MixBaseOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[]) {
+ unsigned int tempPreferred[2];
+ unsigned int facResolution[2];
+ unsigned int color1Resolution[2];
+ unsigned int color2Resolution[2];
+ InputSocket *socket;
+
+ tempPreferred[0] = 0;
+ tempPreferred[1] = 0;
+ socket = this->getInputSocket(0);
+ socket->determineResolution(facResolution, tempPreferred);
+ tempPreferred[0] = 0;
+ tempPreferred[1] = 0;
+ socket = this->getInputSocket(1);
+ socket->determineResolution(color1Resolution, tempPreferred);
+ tempPreferred[0] = 0;
+ tempPreferred[1] = 0;
+ socket = this->getInputSocket(2);
+ socket->determineResolution(color2Resolution, tempPreferred);
+
+ if (color1Resolution[0] != 0 && color1Resolution != 0) {
+ this->setResolutionInputSocketIndex(1);
+ } else if (color2Resolution[0] != 0 && color2Resolution != 0) {
+ this->setResolutionInputSocketIndex(2);
+ } else if (facResolution[0] != 0 && facResolution != 0) {
+ this->setResolutionInputSocketIndex(0);
+ }
+ NodeOperation::determineResolution(resolution, preferredResolution);
+}
Modified: branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.h
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.h 2012-05-06 13:41:27 UTC (rev 46349)
+++ branches/tile/source/blender/compositor/operations/COM_MixBaseOperation.h 2012-05-06 13:49:12 UTC (rev 46350)
@@ -61,6 +61,6 @@
void setUseValueAlphaMultiply(const bool value) {this->valueAlphaMultiply = value;}
bool useValueAlphaMultiply() {return this->valueAlphaMultiply;}
-
+ void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
};
#endif
More information about the Bf-blender-cvs
mailing list