[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46284] branches/tile/source/blender/ compositor/nodes/COM_ViewLevelsNode.cpp: Tile branche
Monique Dewanchand
m.dewanchand at atmind.nl
Fri May 4 17:39:53 CEST 2012
Revision: 46284
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46284
Author: mdewanchand
Date: 2012-05-04 15:39:53 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Tile branche
Fix for [#31283] Crash with Levels node
Modified Paths:
--------------
branches/tile/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp
Modified: branches/tile/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp
===================================================================
--- branches/tile/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp 2012-05-04 15:02:31 UTC (rev 46283)
+++ branches/tile/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp 2012-05-04 15:39:53 UTC (rev 46284)
@@ -30,16 +30,17 @@
}
void ViewLevelsNode::convertToOperations(ExecutionSystem *graph, CompositorContext * context) {
InputSocket * input = this->getInputSocket(0);
+ bool firstOperationConnected = false;
if (input->isConnected()) {
OutputSocket* inputSocket= input->getConnection()->getFromSocket();
- inputSocket->clearConnections();
// add preview to inputSocket;
OutputSocket * socket = this->getOutputSocket(0);
if (socket->isConnected()) {
// calculate mean operation
CalculateMeanOperation * operation = new CalculateMeanOperation();
- addLink(graph, inputSocket, operation->getInputSocket(0));
+ input->relinkConnections(operation->getInputSocket(0), true, 0, graph);
+ firstOperationConnected = true;
operation->setSetting(this->getbNode()->custom1);
socket->relinkConnections(operation->getOutputSocket());
graph->addOperation(operation);
@@ -49,7 +50,11 @@
if (socket->isConnected()) {
// calculate standard deviation operation
CalculateStandardDeviationOperation * operation = new CalculateStandardDeviationOperation();
- addLink(graph, inputSocket, operation->getInputSocket(0));
+ if (firstOperationConnected) {
+ addLink(graph, inputSocket, operation->getInputSocket(0));
+ }else{
+ input->relinkConnections(operation->getInputSocket(0), true, 0, graph);
+ }
operation->setSetting(this->getbNode()->custom1);
socket->relinkConnections(operation->getOutputSocket());
graph->addOperation(operation);
More information about the Bf-blender-cvs
mailing list