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')
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BilateralBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BokehBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BokehImageNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BoxMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_BrightnessNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ChannelMatteNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ChromaMatteNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorBalanceNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorCorrectionNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorCurveNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorMatteNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorRampNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorSpillNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ColorToBWNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CombineColorNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CompositorNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ConvertAlphaNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CornerPinNode.h6
-rw-r--r--source/blender/compositor/nodes/COM_CropNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_CryptomatteNode.cpp121
-rw-r--r--source/blender/compositor/nodes/COM_CryptomatteNode.h37
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DespeckleNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DifferenceMatteNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DilateErodeNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DirectionalBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DisplaceNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DistanceMatteNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_EllipseMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_FlipNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_GammaNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_HueSaturationValueNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_IDMaskNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_InpaintNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_InvertNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_LensDistortionNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MapUVNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MathNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MixNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_MovieDistortionNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_NormalNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_NormalizeNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_PixelateNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_RotateNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ScaleNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SeparateColorNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SetAlphaNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SocketProxyNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SplitViewerNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_Stabilize2dNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SunBeamsNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SwitchNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_SwitchViewNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TimeNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TonemapNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_TranslateNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ValueNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_VectorBlurNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_VectorCurveNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ViewLevelsNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ViewerNode.h4
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.h4
69 files changed, 293 insertions, 135 deletions
diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.h b/source/blender/compositor/nodes/COM_AlphaOverNode.h
index b1fe85cf800..0af2ea3310d 100644
--- a/source/blender/compositor/nodes/COM_AlphaOverNode.h
+++ b/source/blender/compositor/nodes/COM_AlphaOverNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_AlphaOverNode_h_
-#define _COM_AlphaOverNode_h_
+#ifndef __COM_ALPHAOVERNODE_H__
+#define __COM_ALPHAOVERNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_BilateralBlurNode.h b/source/blender/compositor/nodes/COM_BilateralBlurNode.h
index 6d13cd5b96a..babb558e0d1 100644
--- a/source/blender/compositor/nodes/COM_BilateralBlurNode.h
+++ b/source/blender/compositor/nodes/COM_BilateralBlurNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_BilateralBlurNode_h_
-#define _COM_BilateralBlurNode_h_
+#ifndef __COM_BILATERALBLURNODE_H__
+#define __COM_BILATERALBLURNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_BlurNode.h b/source/blender/compositor/nodes/COM_BlurNode.h
index fecba9c0eef..9a5f5ea1efd 100644
--- a/source/blender/compositor/nodes/COM_BlurNode.h
+++ b/source/blender/compositor/nodes/COM_BlurNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_BlurNode_h_
-#define _COM_BlurNode_h_
+#ifndef __COM_BLURNODE_H__
+#define __COM_BLURNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_BokehBlurNode.h b/source/blender/compositor/nodes/COM_BokehBlurNode.h
index 2c8d52ad277..48cd661a7bf 100644
--- a/source/blender/compositor/nodes/COM_BokehBlurNode.h
+++ b/source/blender/compositor/nodes/COM_BokehBlurNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_BokehBlurNode_h_
-#define _COM_BokehBlurNode_h_
+#ifndef __COM_BOKEHBLURNODE_H__
+#define __COM_BOKEHBLURNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_BokehImageNode.h b/source/blender/compositor/nodes/COM_BokehImageNode.h
index 36ee1300661..70f363b8cf6 100644
--- a/source/blender/compositor/nodes/COM_BokehImageNode.h
+++ b/source/blender/compositor/nodes/COM_BokehImageNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_BokehImageNode_h_
-#define _COM_BokehImageNode_h_
+#ifndef __COM_BOKEHIMAGENODE_H__
+#define __COM_BOKEHIMAGENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_BoxMaskNode.h b/source/blender/compositor/nodes/COM_BoxMaskNode.h
index 8229aa58ac1..01557229be9 100644
--- a/source/blender/compositor/nodes/COM_BoxMaskNode.h
+++ b/source/blender/compositor/nodes/COM_BoxMaskNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_BoxMaskNode_h_
-#define _COM_BoxMaskNode_h_
+#ifndef __COM_BOXMASKNODE_H__
+#define __COM_BOXMASKNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_BrightnessNode.h b/source/blender/compositor/nodes/COM_BrightnessNode.h
index bacd3510517..27155e27774 100644
--- a/source/blender/compositor/nodes/COM_BrightnessNode.h
+++ b/source/blender/compositor/nodes/COM_BrightnessNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_BrightnessNode_h_
-#define _COM_BrightnessNode_h_
+#ifndef __COM_BRIGHTNESSNODE_H__
+#define __COM_BRIGHTNESSNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.h b/source/blender/compositor/nodes/COM_ChannelMatteNode.h
index f528578e6dd..c5f062cb215 100644
--- a/source/blender/compositor/nodes/COM_ChannelMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_ChannelMatteNode_h_
-#define _COM_ChannelMatteNode_h_
+#ifndef __COM_CHANNELMATTENODE_H__
+#define __COM_CHANNELMATTENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ChromaMatteNode.h b/source/blender/compositor/nodes/COM_ChromaMatteNode.h
index d1eb3a907ef..7d0b34ecf5d 100644
--- a/source/blender/compositor/nodes/COM_ChromaMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ChromaMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_ChromaMatteNode_h_
-#define _COM_ChromaMatteNode_h_
+#ifndef __COM_CHROMAMATTENODE_H__
+#define __COM_CHROMAMATTENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.h b/source/blender/compositor/nodes/COM_ColorBalanceNode.h
index 1244dbbb7c5..d203fef20f4 100644
--- a/source/blender/compositor/nodes/COM_ColorBalanceNode.h
+++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColorBalanceNode_h_
-#define _COM_ColorBalanceNode_h_
+#ifndef __COM_COLORBALANCENODE_H__
+#define __COM_COLORBALANCENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorCorrectionNode.h b/source/blender/compositor/nodes/COM_ColorCorrectionNode.h
index d943136ceb8..fcbd7631cb4 100644
--- a/source/blender/compositor/nodes/COM_ColorCorrectionNode.h
+++ b/source/blender/compositor/nodes/COM_ColorCorrectionNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColorCorrectionNode_h_
-#define _COM_ColorCorrectionNode_h_
+#ifndef __COM_COLORCORRECTIONNODE_H__
+#define __COM_COLORCORRECTIONNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorCurveNode.h b/source/blender/compositor/nodes/COM_ColorCurveNode.h
index 0f99625e31a..ad51611d1cf 100644
--- a/source/blender/compositor/nodes/COM_ColorCurveNode.h
+++ b/source/blender/compositor/nodes/COM_ColorCurveNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColorCurveNode_h_
-#define _COM_ColorCurveNode_h_
+#ifndef __COM_COLORCURVENODE_H__
+#define __COM_COLORCURVENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorMatteNode.h b/source/blender/compositor/nodes/COM_ColorMatteNode.h
index c17d3eb6c4e..f2c3c08beea 100644
--- a/source/blender/compositor/nodes/COM_ColorMatteNode.h
+++ b/source/blender/compositor/nodes/COM_ColorMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_ColorMatteNode_h_
-#define _COM_ColorMatteNode_h_
+#ifndef __COM_COLORMATTENODE_H__
+#define __COM_COLORMATTENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorNode.h b/source/blender/compositor/nodes/COM_ColorNode.h
index d03c910bfd2..205f4d07135 100644
--- a/source/blender/compositor/nodes/COM_ColorNode.h
+++ b/source/blender/compositor/nodes/COM_ColorNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColorNode_h_
-#define _COM_ColorNode_h_
+#ifndef __COM_COLORNODE_H__
+#define __COM_COLORNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorRampNode.h b/source/blender/compositor/nodes/COM_ColorRampNode.h
index c5e6b2f6154..4332d831e31 100644
--- a/source/blender/compositor/nodes/COM_ColorRampNode.h
+++ b/source/blender/compositor/nodes/COM_ColorRampNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColorRampNode_h_
-#define _COM_ColorRampNode_h_
+#ifndef __COM_COLORRAMPNODE_H__
+#define __COM_COLORRAMPNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorSpillNode.h b/source/blender/compositor/nodes/COM_ColorSpillNode.h
index 7442d2b0261..cb2cd8a2ea3 100644
--- a/source/blender/compositor/nodes/COM_ColorSpillNode.h
+++ b/source/blender/compositor/nodes/COM_ColorSpillNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColorSpillNode_h_
-#define _COM_ColorSpillNode_h_
+#ifndef __COM_COLORSPILLNODE_H__
+#define __COM_COLORSPILLNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ColorToBWNode.h b/source/blender/compositor/nodes/COM_ColorToBWNode.h
index 350ab88513d..05f937eb555 100644
--- a/source/blender/compositor/nodes/COM_ColorToBWNode.h
+++ b/source/blender/compositor/nodes/COM_ColorToBWNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ColorToBWNode_h_
-#define _COM_ColorToBWNode_h_
+#ifndef __COM_COLORTOBWNODE_H__
+#define __COM_COLORTOBWNODE_H__
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_CombineColorNode.h b/source/blender/compositor/nodes/COM_CombineColorNode.h
index d5439e0056c..030224e16f9 100644
--- a/source/blender/compositor/nodes/COM_CombineColorNode.h
+++ b/source/blender/compositor/nodes/COM_CombineColorNode.h
@@ -21,8 +21,8 @@
* Lukas Toenne
*/
-#ifndef _COM_CombineColorNode_h_
-#define _COM_CombineColorNode_h_
+#ifndef __COM_COMBINECOLORNODE_H__
+#define __COM_COMBINECOLORNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_CompositorNode.h b/source/blender/compositor/nodes/COM_CompositorNode.h
index 4e96eb63776..a21013f2ce2 100644
--- a/source/blender/compositor/nodes/COM_CompositorNode.h
+++ b/source/blender/compositor/nodes/COM_CompositorNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_CompositorNode_h_
-#define _COM_CompositorNode_h_
+#ifndef __COM_COMPOSITORNODE_H__
+#define __COM_COMPOSITORNODE_H__
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.h b/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
index 5bc5169b6d9..37482d66269 100644
--- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
+++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_ConvertAlphaNode_h_
-#define _COM_ConvertAlphaNode_h_
+#ifndef __COM_CONVERTALPHANODE_H__
+#define __COM_CONVERTALPHANODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_CornerPinNode.h b/source/blender/compositor/nodes/COM_CornerPinNode.h
index 70e48e41d6b..63428fa653b 100644
--- a/source/blender/compositor/nodes/COM_CornerPinNode.h
+++ b/source/blender/compositor/nodes/COM_CornerPinNode.h
@@ -19,8 +19,8 @@
* Lukas Toenne
*/
-#ifndef _COM_CornerPinNode_h
-#define _COM_CornerPinNode_h
+#ifndef __COM_CORNERPINNODE_H__
+#define __COM_CORNERPINNODE_H__
#include "COM_Node.h"
@@ -38,4 +38,4 @@ public:
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
};
-#endif /* _COM_CornerPinNode_h */
+#endif /* __COM_CORNERPINNODE_H__ */
diff --git a/source/blender/compositor/nodes/COM_CropNode.h b/source/blender/compositor/nodes/COM_CropNode.h
index d33243b915a..a7d529c426f 100644
--- a/source/blender/compositor/nodes/COM_CropNode.h
+++ b/source/blender/compositor/nodes/COM_CropNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_CropNode_h_
-#define _COM_CropNode_h_
+#ifndef __COM_CROPNODE_H__
+#define __COM_CROPNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_CryptomatteNode.cpp b/source/blender/compositor/nodes/COM_CryptomatteNode.cpp
new file mode 100644
index 00000000000..648ea4556ad
--- /dev/null
+++ b/source/blender/compositor/nodes/COM_CryptomatteNode.cpp
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2018, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Lukas Stockner
+ * Stefan Werner
+ */
+
+#include "COM_CryptomatteNode.h"
+#include "COM_CryptomatteOperation.h"
+#include "COM_SetAlphaOperation.h"
+#include "COM_ConvertOperation.h"
+#include "BLI_string.h"
+#include "BLI_hash_mm3.h"
+#include "BLI_assert.h"
+#include <iterator>
+
+CryptomatteNode::CryptomatteNode(bNode *editorNode) : Node(editorNode)
+{
+ /* pass */
+}
+
+/* This is taken from the Cryptomatte specification 1.0. */
+static inline float hash_to_float(uint32_t hash)
+{
+ uint32_t mantissa = hash & (( 1 << 23) - 1);
+ uint32_t exponent = (hash >> 23) & ((1 << 8) - 1);
+ exponent = max(exponent, (uint32_t) 1);
+ exponent = min(exponent, (uint32_t) 254);
+ exponent = exponent << 23;
+ uint32_t sign = (hash >> 31);
+ sign = sign << 31;
+ uint32_t float_bits = sign | exponent | mantissa;
+ float f;
+ /* Bit casting relies on equal size for both types. */
+ BLI_STATIC_ASSERT(sizeof(float) == sizeof(uint32_t), "float and uint32_t are not the same size")
+ ::memcpy(&f, &float_bits, sizeof(float));
+ return f;
+}
+
+void CryptomatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const
+{
+ NodeInput *inputSocketImage = this->getInputSocket(0);
+ NodeOutput *outputSocketImage = this->getOutputSocket(0);
+ NodeOutput *outputSocketMatte = this->getOutputSocket(1);
+ NodeOutput *outputSocketPick = this->getOutputSocket(2);
+
+ bNode *node = this->getbNode();
+ NodeCryptomatte *cryptoMatteSettings = (NodeCryptomatte *)node->storage;
+
+ CryptomatteOperation *operation = new CryptomatteOperation(getNumberOfInputSockets() - 1);
+ if (cryptoMatteSettings) {
+ if (cryptoMatteSettings->matte_id) {
+ /* Split the string by commas, ignoring white space. */
+ std::string input = cryptoMatteSettings->matte_id;
+ std::istringstream ss(input);
+ while (ss.good()) {
+ std::string token;
+ getline(ss, token, ',');
+ /* Ignore empty tokens. */
+ if (token.length() > 0) {
+ size_t first = token.find_first_not_of(' ');
+ size_t last = token.find_last_not_of(' ');
+ if (first == std::string::npos || last == std::string::npos) {
+ break;
+ }
+ token = token.substr(first, (last - first + 1));
+ if (*token.begin() == '<' && *(--token.end()) == '>') {
+ operation->addObjectIndex(atof(token.substr(1, token.length() - 2).c_str()));
+ }
+ else {
+ uint32_t hash = BLI_hash_mm3((const unsigned char *)token.c_str(), token.length(), 0);
+ operation->addObjectIndex(hash_to_float(hash));
+ }
+ }
+ }
+ }
+ }
+
+ converter.addOperation(operation);
+
+ for (int i = 0; i < getNumberOfInputSockets() - 1; ++i) {
+ converter.mapInputSocket(this->getInputSocket(i + 1), operation->getInputSocket(i));
+ }
+
+ SeparateChannelOperation *separateOperation = new SeparateChannelOperation;
+ separateOperation->setChannel(3);
+ converter.addOperation(separateOperation);
+
+ SetAlphaOperation *operationAlpha = new SetAlphaOperation();
+ converter.addOperation(operationAlpha);
+
+ converter.addLink(operation->getOutputSocket(0), separateOperation->getInputSocket(0));
+ converter.addLink(separateOperation->getOutputSocket(0), operationAlpha->getInputSocket(1));
+
+ SetAlphaOperation *clearAlphaOperation = new SetAlphaOperation();
+ converter.addOperation(clearAlphaOperation);
+ converter.addInputValue(clearAlphaOperation->getInputSocket(1), 1.0f);
+
+ converter.addLink(operation->getOutputSocket(0), clearAlphaOperation->getInputSocket(0));
+
+ converter.mapInputSocket(inputSocketImage, operationAlpha->getInputSocket(0));
+ converter.mapOutputSocket(outputSocketMatte, separateOperation->getOutputSocket(0));
+ converter.mapOutputSocket(outputSocketImage, operationAlpha->getOutputSocket(0));
+ converter.mapOutputSocket(outputSocketPick, clearAlphaOperation->getOutputSocket(0));
+
+}
diff --git a/source/blender/compositor/nodes/COM_CryptomatteNode.h b/source/blender/compositor/nodes/COM_CryptomatteNode.h
new file mode 100644
index 00000000000..2e1784dedb9
--- /dev/null
+++ b/source/blender/compositor/nodes/COM_CryptomatteNode.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2018, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Lukas Stockner
+ */
+
+#ifndef __COM_CRYPTOMATTENODE_H__
+#define __COM_CRYPTOMATTENODE_H__
+
+#include "COM_Node.h"
+
+/**
+ * @brief CryptomatteNode
+ * @ingroup Node
+ */
+class CryptomatteNode : public Node {
+public:
+ CryptomatteNode(bNode *editorNode);
+ void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
+};
+
+#endif
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.h b/source/blender/compositor/nodes/COM_DefocusNode.h
index 917499ee93a..99efdd15b37 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.h
+++ b/source/blender/compositor/nodes/COM_DefocusNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_DefocusNode_h_
-#define _COM_DefocusNode_h_
+#ifndef __COM_DEFOCUSNODE_H__
+#define __COM_DEFOCUSNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DespeckleNode.h b/source/blender/compositor/nodes/COM_DespeckleNode.h
index 64d99db7ded..e8097be35dd 100644
--- a/source/blender/compositor/nodes/COM_DespeckleNode.h
+++ b/source/blender/compositor/nodes/COM_DespeckleNode.h
@@ -18,8 +18,8 @@
* Contributor: Campbell Barton
*/
-#ifndef _COM_DespeckleNode_h_
-#define _COM_DespeckleNode_h_
+#ifndef __COM_DESPECKLENODE_H__
+#define __COM_DESPECKLENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DifferenceMatteNode.h b/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
index 98fb917e152..ea3da8d2fca 100644
--- a/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_DifferenceMatteNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_DifferenceMatteNode_h_
-#define _COM_DifferenceMatteNode_h_
+#ifndef __COM_DIFFERENCEMATTENODE_H__
+#define __COM_DIFFERENCEMATTENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DilateErodeNode.h b/source/blender/compositor/nodes/COM_DilateErodeNode.h
index 560087da30a..aff3ecbb4b0 100644
--- a/source/blender/compositor/nodes/COM_DilateErodeNode.h
+++ b/source/blender/compositor/nodes/COM_DilateErodeNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_DilateErodeNode_h_
-#define _COM_DilateErodeNode_h_
+#ifndef __COM_DILATEERODENODE_H__
+#define __COM_DILATEERODENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DirectionalBlurNode.h b/source/blender/compositor/nodes/COM_DirectionalBlurNode.h
index 720ac32005e..eef51e140bc 100644
--- a/source/blender/compositor/nodes/COM_DirectionalBlurNode.h
+++ b/source/blender/compositor/nodes/COM_DirectionalBlurNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_DirectionalBlurNode_h_
-#define _COM_DirectionalBlurNode_h_
+#ifndef __COM_DIRECTIONALBLURNODE_H__
+#define __COM_DIRECTIONALBLURNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DisplaceNode.h b/source/blender/compositor/nodes/COM_DisplaceNode.h
index 6eb894077fc..28105fd5963 100644
--- a/source/blender/compositor/nodes/COM_DisplaceNode.h
+++ b/source/blender/compositor/nodes/COM_DisplaceNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_DisplaceNode_h_
-#define _COM_DisplaceNode_h_
+#ifndef __COM_DISPLACENODE_H__
+#define __COM_DISPLACENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DistanceMatteNode.h b/source/blender/compositor/nodes/COM_DistanceMatteNode.h
index e7a514b79c4..e7bd3c57dfa 100644
--- a/source/blender/compositor/nodes/COM_DistanceMatteNode.h
+++ b/source/blender/compositor/nodes/COM_DistanceMatteNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_DistanceMatteNode_h_
-#define _COM_DistanceMatteNode_h_
+#ifndef __COM_DISTANCEMATTENODE_H__
+#define __COM_DISTANCEMATTENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
index 4ee58e18c9b..91a23005128 100644
--- a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
+++ b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_DoubleEdgeMaskNode_h_
-#define _COM_DoubleEdgeMaskNode_h_
+#ifndef __COM_DOUBLEEDGEMASKNODE_H__
+#define __COM_DOUBLEEDGEMASKNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_EllipseMaskNode.h b/source/blender/compositor/nodes/COM_EllipseMaskNode.h
index 50c578c2d7b..e5e9861b2d9 100644
--- a/source/blender/compositor/nodes/COM_EllipseMaskNode.h
+++ b/source/blender/compositor/nodes/COM_EllipseMaskNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_EllipseMaskNode_h_
-#define _COM_EllipseMaskNode_h_
+#ifndef __COM_ELLIPSEMASKNODE_H__
+#define __COM_ELLIPSEMASKNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_FlipNode.h b/source/blender/compositor/nodes/COM_FlipNode.h
index 033f893ab76..8c9a78df85d 100644
--- a/source/blender/compositor/nodes/COM_FlipNode.h
+++ b/source/blender/compositor/nodes/COM_FlipNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_FlipNode_h_
-#define _COM_FlipNode_h_
+#ifndef __COM_FLIPNODE_H__
+#define __COM_FLIPNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_GammaNode.h b/source/blender/compositor/nodes/COM_GammaNode.h
index 3b8a530edd9..8b6434b9c6a 100644
--- a/source/blender/compositor/nodes/COM_GammaNode.h
+++ b/source/blender/compositor/nodes/COM_GammaNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_GammaNode_h_
-#define _COM_GammaNode_h_
+#ifndef __COM_GAMMANODE_H__
+#define __COM_GAMMANODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_GlareNode.h b/source/blender/compositor/nodes/COM_GlareNode.h
index afc9ad3e6f3..93f92313835 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.h
+++ b/source/blender/compositor/nodes/COM_GlareNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_GlareNode_h_
-#define _COM_GlareNode_h_
+#ifndef __COM_GLARENODE_H__
+#define __COM_GLARENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
index cc425626608..f940a20e0da 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_HueSaturationValueCorrectNode_h_
-#define _COM_HueSaturationValueCorrectNode_h_
+#ifndef __COM_HUESATURATIONVALUECORRECTNODE_H__
+#define __COM_HUESATURATIONVALUECORRECTNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.h b/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
index 669cb6d2cff..f09164de34f 100644
--- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
+++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_HueSaturationValueNode_h_
-#define _COM_HueSaturationValueNode_h_
+#ifndef __COM_HUESATURATIONVALUENODE_H__
+#define __COM_HUESATURATIONVALUENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_IDMaskNode.h b/source/blender/compositor/nodes/COM_IDMaskNode.h
index 120d173e5c3..8a6e55a946e 100644
--- a/source/blender/compositor/nodes/COM_IDMaskNode.h
+++ b/source/blender/compositor/nodes/COM_IDMaskNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_IDMaskNode_h_
-#define _COM_IDMaskNode_h_
+#ifndef __COM_IDMASKNODE_H__
+#define __COM_IDMASKNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_InpaintNode.h b/source/blender/compositor/nodes/COM_InpaintNode.h
index 6c167ed90ff..dcc563234be 100644
--- a/source/blender/compositor/nodes/COM_InpaintNode.h
+++ b/source/blender/compositor/nodes/COM_InpaintNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_InpaintNode_h_
-#define _COM_InpaintNode_h_
+#ifndef __COM_INPAINTNODE_H__
+#define __COM_INPAINTNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_InvertNode.h b/source/blender/compositor/nodes/COM_InvertNode.h
index a946799ce67..9ca774e7600 100644
--- a/source/blender/compositor/nodes/COM_InvertNode.h
+++ b/source/blender/compositor/nodes/COM_InvertNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_InvertNode_h_
-#define _COM_InvertNode_h_
+#ifndef __COM_INVERTNODE_H__
+#define __COM_INVERTNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_LensDistortionNode.h b/source/blender/compositor/nodes/COM_LensDistortionNode.h
index 231de6a5175..ee0f9f1bc06 100644
--- a/source/blender/compositor/nodes/COM_LensDistortionNode.h
+++ b/source/blender/compositor/nodes/COM_LensDistortionNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_LensDistortionNode_h_
-#define _COM_LensDistortionNode_h_
+#ifndef __COM_LENSDISTORTIONNODE_H__
+#define __COM_LENSDISTORTIONNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_MapUVNode.h b/source/blender/compositor/nodes/COM_MapUVNode.h
index 286ec4205f1..245a31ce83c 100644
--- a/source/blender/compositor/nodes/COM_MapUVNode.h
+++ b/source/blender/compositor/nodes/COM_MapUVNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_MapUVNode_h_
-#define _COM_MapUVNode_h_
+#ifndef __COM_MAPUVNODE_H__
+#define __COM_MAPUVNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_MathNode.h b/source/blender/compositor/nodes/COM_MathNode.h
index 4c84dc2a331..cf92765f6da 100644
--- a/source/blender/compositor/nodes/COM_MathNode.h
+++ b/source/blender/compositor/nodes/COM_MathNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_MathNode_h_
-#define _COM_MathNode_h_
+#ifndef __COM_MATHNODE_H__
+#define __COM_MATHNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_MixNode.h b/source/blender/compositor/nodes/COM_MixNode.h
index e5424c2f4e5..10954080a51 100644
--- a/source/blender/compositor/nodes/COM_MixNode.h
+++ b/source/blender/compositor/nodes/COM_MixNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_MixNode_h_
-#define _COM_MixNode_h_
+#ifndef __COM_MIXNODE_H__
+#define __COM_MIXNODE_H__
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_MovieDistortionNode.h b/source/blender/compositor/nodes/COM_MovieDistortionNode.h
index 5ef0115bbaa..97cfaec57c8 100644
--- a/source/blender/compositor/nodes/COM_MovieDistortionNode.h
+++ b/source/blender/compositor/nodes/COM_MovieDistortionNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_MovieDistortionNode_h_
-#define _COM_MovieDistortionNode_h_
+#ifndef __COM_MOVIEDISTORTIONNODE_H__
+#define __COM_MOVIEDISTORTIONNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_NormalNode.h b/source/blender/compositor/nodes/COM_NormalNode.h
index c9b37580eca..4e1dbe55360 100644
--- a/source/blender/compositor/nodes/COM_NormalNode.h
+++ b/source/blender/compositor/nodes/COM_NormalNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_NormalNode_h_
-#define _COM_NormalNode_h_
+#ifndef __COM_NORMALNODE_H__
+#define __COM_NORMALNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_NormalizeNode.h b/source/blender/compositor/nodes/COM_NormalizeNode.h
index a0eb7c9f5a9..02f413c6ae4 100644
--- a/source/blender/compositor/nodes/COM_NormalizeNode.h
+++ b/source/blender/compositor/nodes/COM_NormalizeNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_NormalizeNode_h_
-#define _COM_NormalizeNode_h_
+#ifndef __COM_NORMALIZENODE_H__
+#define __COM_NORMALIZENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.h b/source/blender/compositor/nodes/COM_OutputFileNode.h
index b321572d638..b246dd2a541 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.h
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.h
@@ -21,8 +21,8 @@
* Lukas Tönne
*/
-#ifndef _COM_OutputFileNode_h_
-#define _COM_OutputFileNode_h_
+#ifndef __COM_OUTPUTFILENODE_H__
+#define __COM_OUTPUTFILENODE_H__
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_PixelateNode.h b/source/blender/compositor/nodes/COM_PixelateNode.h
index 06ac886c843..b43c15b01da 100644
--- a/source/blender/compositor/nodes/COM_PixelateNode.h
+++ b/source/blender/compositor/nodes/COM_PixelateNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_PixelateNode_h_
-#define _COM_PixelateNode_h_
+#ifndef __COM_PIXELATENODE_H__
+#define __COM_PIXELATENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_RotateNode.h b/source/blender/compositor/nodes/COM_RotateNode.h
index e897c9a49df..e3c9710891b 100644
--- a/source/blender/compositor/nodes/COM_RotateNode.h
+++ b/source/blender/compositor/nodes/COM_RotateNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_RotateNode_h_
-#define _COM_RotateNode_h_
+#ifndef __COM_ROTATENODE_H__
+#define __COM_ROTATENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ScaleNode.h b/source/blender/compositor/nodes/COM_ScaleNode.h
index 614866d2318..b1695aab966 100644
--- a/source/blender/compositor/nodes/COM_ScaleNode.h
+++ b/source/blender/compositor/nodes/COM_ScaleNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ScaleNode_h_
-#define _COM_ScaleNode_h_
+#ifndef __COM_SCALENODE_H__
+#define __COM_SCALENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_SeparateColorNode.h b/source/blender/compositor/nodes/COM_SeparateColorNode.h
index 0e47a98a1aa..a1ec23b71c7 100644
--- a/source/blender/compositor/nodes/COM_SeparateColorNode.h
+++ b/source/blender/compositor/nodes/COM_SeparateColorNode.h
@@ -21,8 +21,8 @@
* Lukas Toenne
*/
-#ifndef _COM_SeparateColorNode_h_
-#define _COM_SeparateColorNode_h_
+#ifndef __COM_SEPARATECOLORNODE_H__
+#define __COM_SEPARATECOLORNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_SetAlphaNode.h b/source/blender/compositor/nodes/COM_SetAlphaNode.h
index efc8ccf1f27..f71d743c1d4 100644
--- a/source/blender/compositor/nodes/COM_SetAlphaNode.h
+++ b/source/blender/compositor/nodes/COM_SetAlphaNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SetAlphaNode_h_
-#define _COM_SetAlphaNode_h_
+#ifndef __COM_SETALPHANODE_H__
+#define __COM_SETALPHANODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_SocketProxyNode.h b/source/blender/compositor/nodes/COM_SocketProxyNode.h
index faa458492cb..ce19a9abd7d 100644
--- a/source/blender/compositor/nodes/COM_SocketProxyNode.h
+++ b/source/blender/compositor/nodes/COM_SocketProxyNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SocketProxyNode_h_
-#define _COM_SocketProxyNode_h_
+#ifndef __COM_SOCKETPROXYNODE_H__
+#define __COM_SOCKETPROXYNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_SplitViewerNode.h b/source/blender/compositor/nodes/COM_SplitViewerNode.h
index 674067696ea..c073713f21f 100644
--- a/source/blender/compositor/nodes/COM_SplitViewerNode.h
+++ b/source/blender/compositor/nodes/COM_SplitViewerNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SplitViewerNode_h_
-#define _COM_SplitViewerNode_h_
+#ifndef __COM_SPLITVIEWERNODE_H__
+#define __COM_SPLITVIEWERNODE_H__
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_Stabilize2dNode.h b/source/blender/compositor/nodes/COM_Stabilize2dNode.h
index d0b5f6e96f6..2859432fac7 100644
--- a/source/blender/compositor/nodes/COM_Stabilize2dNode.h
+++ b/source/blender/compositor/nodes/COM_Stabilize2dNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_Stabilize2dNode_h_
-#define _COM_Stabilize2dNode_h_
+#ifndef __COM_STABILIZE2DNODE_H__
+#define __COM_STABILIZE2DNODE_H__
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_SunBeamsNode.h b/source/blender/compositor/nodes/COM_SunBeamsNode.h
index 4024eb276bc..425b97061ca 100644
--- a/source/blender/compositor/nodes/COM_SunBeamsNode.h
+++ b/source/blender/compositor/nodes/COM_SunBeamsNode.h
@@ -19,8 +19,8 @@
* Lukas Toenne
*/
-#ifndef _COM_SunBeamsNode_h_
-#define _COM_SunBeamsNode_h_
+#ifndef __COM_SUNBEAMSNODE_H__
+#define __COM_SUNBEAMSNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_SwitchNode.h b/source/blender/compositor/nodes/COM_SwitchNode.h
index 37ba73528f3..5967bbd5dd0 100644
--- a/source/blender/compositor/nodes/COM_SwitchNode.h
+++ b/source/blender/compositor/nodes/COM_SwitchNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_SwitchNode_h_
-#define _COM_SwitchNode_h_
+#ifndef __COM_SWITCHNODE_H__
+#define __COM_SWITCHNODE_H__
#include "COM_Node.h"
#include "COM_NodeOperation.h"
diff --git a/source/blender/compositor/nodes/COM_SwitchViewNode.h b/source/blender/compositor/nodes/COM_SwitchViewNode.h
index 6ab5145bed5..f4171940880 100644
--- a/source/blender/compositor/nodes/COM_SwitchViewNode.h
+++ b/source/blender/compositor/nodes/COM_SwitchViewNode.h
@@ -19,8 +19,8 @@
* Dalai Felinto
*/
-#ifndef _COM_SwitchViewNode_h_
-#define _COM_SwitchViewNode_h_
+#ifndef __COM_SWITCHVIEWNODE_H__
+#define __COM_SWITCHVIEWNODE_H__
#include "COM_Node.h"
#include "COM_NodeOperation.h"
diff --git a/source/blender/compositor/nodes/COM_TimeNode.h b/source/blender/compositor/nodes/COM_TimeNode.h
index 065c55f2780..7ebc6f2cc67 100644
--- a/source/blender/compositor/nodes/COM_TimeNode.h
+++ b/source/blender/compositor/nodes/COM_TimeNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_TimeNode_h_
-#define _COM_TimeNode_h_
+#ifndef __COM_TIMENODE_H__
+#define __COM_TIMENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_TonemapNode.h b/source/blender/compositor/nodes/COM_TonemapNode.h
index e504db4c014..13e51acf3fe 100644
--- a/source/blender/compositor/nodes/COM_TonemapNode.h
+++ b/source/blender/compositor/nodes/COM_TonemapNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_TonemapNode_h_
-#define _COM_TonemapNode_h_
+#ifndef __COM_TONEMAPNODE_H__
+#define __COM_TONEMAPNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_TranslateNode.h b/source/blender/compositor/nodes/COM_TranslateNode.h
index 484f28b1089..51d969dbb04 100644
--- a/source/blender/compositor/nodes/COM_TranslateNode.h
+++ b/source/blender/compositor/nodes/COM_TranslateNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_TranslateNode_h_
-#define _COM_TranslateNode_h_
+#ifndef __COM_TRANSLATENODE_H__
+#define __COM_TRANSLATENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ValueNode.h b/source/blender/compositor/nodes/COM_ValueNode.h
index b88c502be7f..e1b13c2d8aa 100644
--- a/source/blender/compositor/nodes/COM_ValueNode.h
+++ b/source/blender/compositor/nodes/COM_ValueNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ValueNode_h_
-#define _COM_ValueNode_h_
+#ifndef __COM_VALUENODE_H__
+#define __COM_VALUENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_VectorBlurNode.h b/source/blender/compositor/nodes/COM_VectorBlurNode.h
index 0e7ad015cc5..5f741ff0852 100644
--- a/source/blender/compositor/nodes/COM_VectorBlurNode.h
+++ b/source/blender/compositor/nodes/COM_VectorBlurNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_VectorBlurNode_h_
-#define _COM_VectorBlurNode_h_
+#ifndef __COM_VECTORBLURNODE_H__
+#define __COM_VECTORBLURNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_VectorCurveNode.h b/source/blender/compositor/nodes/COM_VectorCurveNode.h
index 8cf76cff206..d8a2121a7c6 100644
--- a/source/blender/compositor/nodes/COM_VectorCurveNode.h
+++ b/source/blender/compositor/nodes/COM_VectorCurveNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_VectorCurveNode_h_
-#define _COM_VectorCurveNode_h_
+#ifndef __COM_VECTORCURVENODE_H__
+#define __COM_VECTORCURVENODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ViewLevelsNode.h b/source/blender/compositor/nodes/COM_ViewLevelsNode.h
index c56c6b0cef1..7fca060389a 100644
--- a/source/blender/compositor/nodes/COM_ViewLevelsNode.h
+++ b/source/blender/compositor/nodes/COM_ViewLevelsNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ViewLevelsNode_h_
-#define _COM_ViewLevelsNode_h_
+#ifndef __COM_VIEWLEVELSNODE_H__
+#define __COM_VIEWLEVELSNODE_H__
#include "COM_Node.h"
diff --git a/source/blender/compositor/nodes/COM_ViewerNode.h b/source/blender/compositor/nodes/COM_ViewerNode.h
index 1f2cb02dcd6..67d6387a17c 100644
--- a/source/blender/compositor/nodes/COM_ViewerNode.h
+++ b/source/blender/compositor/nodes/COM_ViewerNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ViewerNode_h_
-#define _COM_ViewerNode_h_
+#ifndef __COM_VIEWERNODE_H__
+#define __COM_VIEWERNODE_H__
#include "COM_Node.h"
#include "DNA_node_types.h"
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.h b/source/blender/compositor/nodes/COM_ZCombineNode.h
index 9a438d6dde3..8e166ddf168 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.h
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.h
@@ -20,8 +20,8 @@
* Monique Dewanchand
*/
-#ifndef _COM_ZCombineNode_h_
-#define _COM_ZCombineNode_h_
+#ifndef __COM_ZCOMBINENODE_H__
+#define __COM_ZCOMBINENODE_H__
#include "COM_Node.h"