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:
Diffstat (limited to 'source/blender/compositor/nodes/COM_MuteNode.cpp')
-rw-r--r--source/blender/compositor/nodes/COM_MuteNode.cpp74
1 files changed, 36 insertions, 38 deletions
diff --git a/source/blender/compositor/nodes/COM_MuteNode.cpp b/source/blender/compositor/nodes/COM_MuteNode.cpp
index 72303a4d6ee..ccf7721b989 100644
--- a/source/blender/compositor/nodes/COM_MuteNode.cpp
+++ b/source/blender/compositor/nodes/COM_MuteNode.cpp
@@ -27,14 +27,15 @@
#include "COM_SetVectorOperation.h"
#include "COM_SetColorOperation.h"
-MuteNode::MuteNode(bNode *editorNode): Node(editorNode)
+MuteNode::MuteNode(bNode *editorNode) : Node(editorNode)
{
+ /* pass */
}
-void MuteNode::reconnect(ExecutionSystem * graph, OutputSocket * output)
+void MuteNode::reconnect(ExecutionSystem *graph, OutputSocket *output)
{
- vector<InputSocket*> &inputsockets = this->getInputSockets();
- for (unsigned int index = 0; index < inputsockets.size() ; index ++) {
+ vector<InputSocket *> &inputsockets = this->getInputSockets();
+ for (unsigned int index = 0; index < inputsockets.size(); index++) {
InputSocket *input = inputsockets[index];
if (input->getDataType() == output->getDataType()) {
if (input->isConnected()) {
@@ -44,37 +45,34 @@ void MuteNode::reconnect(ExecutionSystem * graph, OutputSocket * output)
}
}
- NodeOperation * operation;
+ NodeOperation *operation = NULL;
switch (output->getDataType()) {
- case COM_DT_VALUE:
- {
- SetValueOperation *valueoperation = new SetValueOperation();
- valueoperation->setValue(0.0f);
- operation = valueoperation;
- break;
- }
- case COM_DT_VECTOR:
- {
- SetVectorOperation *vectoroperation = new SetVectorOperation();
- vectoroperation->setX(0.0f);
- vectoroperation->setY(0.0f);
- vectoroperation->setW(0.0f);
- operation = vectoroperation;
- break;
- }
- case COM_DT_COLOR:
- {
- SetColorOperation *coloroperation = new SetColorOperation();
- coloroperation->setChannel1(0.0f);
- coloroperation->setChannel2(0.0f);
- coloroperation->setChannel3(0.0f);
- coloroperation->setChannel4(0.0f);
- operation = coloroperation;
- break;
- }
- /* quiet warnings */
- case COM_DT_UNKNOWN:
- break;
+ case COM_DT_VALUE:
+ {
+ SetValueOperation *valueoperation = new SetValueOperation();
+ valueoperation->setValue(0.0f);
+ operation = valueoperation;
+ break;
+ }
+ case COM_DT_VECTOR:
+ {
+ SetVectorOperation *vectoroperation = new SetVectorOperation();
+ vectoroperation->setX(0.0f);
+ vectoroperation->setY(0.0f);
+ vectoroperation->setW(0.0f);
+ operation = vectoroperation;
+ break;
+ }
+ case COM_DT_COLOR:
+ {
+ SetColorOperation *coloroperation = new SetColorOperation();
+ coloroperation->setChannel1(0.0f);
+ coloroperation->setChannel2(0.0f);
+ coloroperation->setChannel3(0.0f);
+ coloroperation->setChannel4(0.0f);
+ operation = coloroperation;
+ break;
+ }
}
if (operation) {
@@ -85,12 +83,12 @@ void MuteNode::reconnect(ExecutionSystem * graph, OutputSocket * output)
output->clearConnections();
}
-void MuteNode::convertToOperations(ExecutionSystem *graph, CompositorContext * context)
+void MuteNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
{
- vector<OutputSocket*> &outputsockets = this->getOutputSockets();
+ vector<OutputSocket *> &outputsockets = this->getOutputSockets();
- for (unsigned int index = 0 ; index < outputsockets.size() ; index ++) {
- OutputSocket * output = outputsockets[index];
+ for (unsigned int index = 0; index < outputsockets.size(); index++) {
+ OutputSocket *output = outputsockets[index];
if (output->isConnected()) {
reconnect(graph, output);
}