[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57885] trunk/blender/source/blender/ compositor: Fix for
Jeroen Bakker
j.bakker at atmind.nl
Sun Jun 30 15:35:01 CEST 2013
Revision: 57885
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57885
Author: jbakker
Date: 2013-06-30 13:35:00 +0000 (Sun, 30 Jun 2013)
Log Message:
-----------
Fix for
* [#35922] RGB Input Node doesn't work properly
Modified Paths:
--------------
trunk/blender/source/blender/compositor/nodes/COM_MixNode.cpp
trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.h
Modified: trunk/blender/source/blender/compositor/nodes/COM_MixNode.cpp
===================================================================
--- trunk/blender/source/blender/compositor/nodes/COM_MixNode.cpp 2013-06-30 11:56:15 UTC (rev 57884)
+++ trunk/blender/source/blender/compositor/nodes/COM_MixNode.cpp 2013-06-30 13:35:00 UTC (rev 57885)
@@ -124,16 +124,6 @@
convertProg->setUseValueAlphaMultiply(useAlphaPremultiply);
convertProg->setUseClamp(useClamp);
- if (color1Socket->isConnected()) {
- convertProg->setResolutionInputSocketIndex(1);
- }
- else {
- if (color2Socket->isConnected())
- convertProg->setResolutionInputSocketIndex(2);
- else
- convertProg->setResolutionInputSocketIndex(0);
- }
-
valueSocket->relinkConnections(convertProg->getInputSocket(0), 0, graph);
color1Socket->relinkConnections(convertProg->getInputSocket(1), 1, graph);
color2Socket->relinkConnections(convertProg->getInputSocket(2), 2, graph);
Modified: trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp 2013-06-30 11:56:15 UTC (rev 57884)
+++ trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp 2013-06-30 13:35:00 UTC (rev 57885)
@@ -63,6 +63,30 @@
output[3] = inputColor1[3];
}
+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)) {
+ this->setResolutionInputSocketIndex(1);
+ }
+ else {
+ socket = this->getInputSocket(2);
+ socket->determineResolution(tempResolution, tempPreferredResolution);
+ if ((tempResolution[0] != 0) && (tempResolution[1] != 0)) {
+ this->setResolutionInputSocketIndex(2);
+ }
+ else {
+ this->setResolutionInputSocketIndex(0);
+ }
+ }
+ NodeOperation::determineResolution(resolution, preferredResolution);
+}
+
void MixBaseOperation::deinitExecution()
{
this->m_inputValueOperation = NULL;
Modified: trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.h 2013-06-30 11:56:15 UTC (rev 57884)
+++ trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.h 2013-06-30 13:35:00 UTC (rev 57885)
@@ -70,6 +70,9 @@
* Deinitialize the execution
*/
void deinitExecution();
+
+ void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
+
void setUseValueAlphaMultiply(const bool value) { this->m_valueAlphaMultiply = value; }
bool useValueAlphaMultiply() { return this->m_valueAlphaMultiply; }
More information about the Bf-blender-cvs
mailing list