Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-12-07 15:52:12 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-01-26 17:20:13 +0300
commitac58a7fa190de82ee8265cfe9f1b7a7323b86982 (patch)
treec5f7ab63e5fcbec65426742e46540bfc161974b6 /source/blender/compositor/nodes
parent18cf3e1a38a3cf50a182ef8ae764ccd3b37216aa (diff)
Compositor: Make HSV node inputs a real sockets
This is much more flexible solution which will allow doing some more procedural features. Reviewers: brecht, dfelinto, mont29 Reviewed By: mont29 Subscribers: Severin Differential Revision: https://developer.blender.org/D2403
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
index 29c296a896d..b8971fffe3e 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
@@ -37,8 +37,11 @@ HueSaturationValueNode::HueSaturationValueNode(bNode *editorNode) : Node(editorN
void HueSaturationValueNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const
{
- NodeInput *valueSocket = this->getInputSocket(0);
- NodeInput *colorSocket = this->getInputSocket(1);
+ NodeInput *colorSocket = this->getInputSocket(0);
+ NodeInput *hueSocket = this->getInputSocket(1);
+ NodeInput *saturationSocket = this->getInputSocket(2);
+ NodeInput *valueSocket = this->getInputSocket(3);
+ NodeInput *facSocket = this->getInputSocket(4);
NodeOutput *outputSocket = this->getOutputSocket(0);
bNode *editorsnode = getbNode();
NodeHueSat *storage = (NodeHueSat *)editorsnode->storage;
@@ -50,9 +53,9 @@ void HueSaturationValueNode::convertToOperations(NodeConverter &converter, const
converter.addOperation(hsvToRGB);
ChangeHSVOperation *changeHSV = new ChangeHSVOperation();
- changeHSV->setHue(storage->hue);
- changeHSV->setSaturation(storage->sat);
- changeHSV->setValue(storage->val);
+ converter.mapInputSocket(hueSocket, changeHSV->getInputSocket(1));
+ converter.mapInputSocket(saturationSocket, changeHSV->getInputSocket(2));
+ converter.mapInputSocket(valueSocket, changeHSV->getInputSocket(3));
converter.addOperation(changeHSV);
MixBlendOperation *blend = new MixBlendOperation();
@@ -64,6 +67,6 @@ void HueSaturationValueNode::convertToOperations(NodeConverter &converter, const
converter.addLink(changeHSV->getOutputSocket(), hsvToRGB->getInputSocket(0));
converter.addLink(hsvToRGB->getOutputSocket(), blend->getInputSocket(2));
converter.mapInputSocket(colorSocket, blend->getInputSocket(1));
- converter.mapInputSocket(valueSocket, blend->getInputSocket(0));
+ converter.mapInputSocket(facSocket, blend->getInputSocket(0));
converter.mapOutputSocket(outputSocket, blend->getOutputSocket());
}