There was a regression in recent bugfix which touched Mix node.

This commit hopefully fixes that regression.
This commit is contained in:
2013-03-14 16:25:32 +00:00
parent 84b90c2968
commit 2b845d3b2a
3 changed files with 10 additions and 18 deletions

View File

@@ -124,6 +124,16 @@ void MixNode::convertToOperations(ExecutionSystem *graph, CompositorContext *con
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);

View File

@@ -69,19 +69,3 @@ void MixBaseOperation::deinitExecution()
this->m_inputColor1Operation = NULL;
this->m_inputColor2Operation = NULL;
}
void MixBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2])
{
if (this->getInputSocket(1)->isConnected()) {
this->setResolutionInputSocketIndex(1);
}
else {
if (this->getInputSocket(2)->isConnected()) {
this->setResolutionInputSocketIndex(2);
}
else {
this->setResolutionInputSocketIndex(0);
}
}
NodeOperation::determineResolution(resolution, preferredResolution);
}

View File

@@ -71,8 +71,6 @@ public:
*/
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; }
void setUseClamp(bool value) { this->m_useClamp = value; }