diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-21 22:32:23 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-21 22:32:23 +0400 |
commit | 40f974d15f544639af0b7f056bb8e6966119c221 (patch) | |
tree | 870fcb91c263ecf6d5ee8e473eb1e42ff9a2c348 /source/blender | |
parent | 874c9fc33ee904f3a379ef9b6a2284fa9c466fe4 (diff) |
[#31895] Connect 'Hue Correct' to 'Viewer' crashes.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp index 6057a7f0e6c..df125403f98 100644 --- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp +++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp @@ -46,27 +46,25 @@ void HueSaturationValueCorrectNode::convertToOperations(ExecutionSystem *graph, bNode *editorsnode = getbNode(); CurveMapping *storage = (CurveMapping *)editorsnode->storage; - if (colourSocket->isConnected() && outputSocket->isConnected()) { - ConvertRGBToHSVOperation *rgbToHSV = new ConvertRGBToHSVOperation(); - ConvertHSVToRGBOperation *hsvToRGB = new ConvertHSVToRGBOperation(); - HueSaturationValueCorrectOperation *changeHSV = new HueSaturationValueCorrectOperation(); - MixBlendOperation *blend = new MixBlendOperation(); - - colourSocket->relinkConnections(rgbToHSV->getInputSocket(0), 1, graph); - addLink(graph, rgbToHSV->getOutputSocket(), changeHSV->getInputSocket(0)); - addLink(graph, changeHSV->getOutputSocket(), hsvToRGB->getInputSocket(0)); - addLink(graph, hsvToRGB->getOutputSocket(), blend->getInputSocket(2)); - addLink(graph, rgbToHSV->getInputSocket(0)->getConnection()->getFromSocket(), blend->getInputSocket(1)); - valueSocket->relinkConnections(blend->getInputSocket(0), 0, graph); - outputSocket->relinkConnections(blend->getOutputSocket()); - - changeHSV->setCurveMapping(storage); - - blend->setResolutionInputSocketIndex(1); - - graph->addOperation(rgbToHSV); - graph->addOperation(hsvToRGB); - graph->addOperation(changeHSV); - graph->addOperation(blend); - } + ConvertRGBToHSVOperation *rgbToHSV = new ConvertRGBToHSVOperation(); + ConvertHSVToRGBOperation *hsvToRGB = new ConvertHSVToRGBOperation(); + HueSaturationValueCorrectOperation *changeHSV = new HueSaturationValueCorrectOperation(); + MixBlendOperation *blend = new MixBlendOperation(); + + colourSocket->relinkConnections(rgbToHSV->getInputSocket(0), 1, graph); + addLink(graph, rgbToHSV->getOutputSocket(), changeHSV->getInputSocket(0)); + addLink(graph, changeHSV->getOutputSocket(), hsvToRGB->getInputSocket(0)); + addLink(graph, hsvToRGB->getOutputSocket(), blend->getInputSocket(2)); + addLink(graph, rgbToHSV->getInputSocket(0)->getConnection()->getFromSocket(), blend->getInputSocket(1)); + valueSocket->relinkConnections(blend->getInputSocket(0), 0, graph); + outputSocket->relinkConnections(blend->getOutputSocket()); + + changeHSV->setCurveMapping(storage); + + blend->setResolutionInputSocketIndex(1); + + graph->addOperation(rgbToHSV); + graph->addOperation(hsvToRGB); + graph->addOperation(changeHSV); + graph->addOperation(blend); } |