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_CryptomatteNode.h')
-rw-r--r--source/blender/compositor/nodes/COM_CryptomatteNode.h62
1 files changed, 60 insertions, 2 deletions
diff --git a/source/blender/compositor/nodes/COM_CryptomatteNode.h b/source/blender/compositor/nodes/COM_CryptomatteNode.h
index 1fb8893efa0..e99a104c914 100644
--- a/source/blender/compositor/nodes/COM_CryptomatteNode.h
+++ b/source/blender/compositor/nodes/COM_CryptomatteNode.h
@@ -18,14 +18,72 @@
#pragma once
+#include "BLI_string_ref.hh"
+#include "BLI_vector.hh"
+
+#include "COM_CryptomatteOperation.h"
#include "COM_Node.h"
/**
* \brief CryptomatteNode
* \ingroup Node
*/
-class CryptomatteNode : public Node {
+class CryptomatteBaseNode : public Node {
+ protected:
+ CryptomatteBaseNode(bNode *editor_node) : Node(editor_node)
+ {
+ /* pass */
+ }
+
public:
- CryptomatteNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
+
+ protected:
+ virtual CryptomatteOperation *create_cryptomatte_operation(
+ NodeConverter &converter,
+ const CompositorContext &context,
+ const bNode &node,
+ const NodeCryptomatte *cryptomatte_settings) const = 0;
+};
+
+class CryptomatteNode : public CryptomatteBaseNode {
+ public:
+ CryptomatteNode(bNode *editor_node) : CryptomatteBaseNode(editor_node)
+ {
+ /* pass */
+ }
+
+ protected:
+ CryptomatteOperation *create_cryptomatte_operation(
+ NodeConverter &converter,
+ const CompositorContext &context,
+ const bNode &node,
+ const NodeCryptomatte *cryptomatte_settings) const override;
+
+ private:
+ static blender::Vector<NodeOperation *> create_input_operations(const CompositorContext &context,
+ const bNode &node);
+ static void input_operations_from_render_source(
+ const CompositorContext &context,
+ const bNode &node,
+ blender::Vector<NodeOperation *> &r_input_operations);
+ static void input_operations_from_image_source(
+ const CompositorContext &context,
+ const bNode &node,
+ blender::Vector<NodeOperation *> &r_input_operations);
+};
+
+class CryptomatteLegacyNode : public CryptomatteBaseNode {
+ public:
+ CryptomatteLegacyNode(bNode *editor_node) : CryptomatteBaseNode(editor_node)
+ {
+ /* pass */
+ }
+
+ protected:
+ CryptomatteOperation *create_cryptomatte_operation(
+ NodeConverter &converter,
+ const CompositorContext &context,
+ const bNode &node,
+ const NodeCryptomatte *cryptomatte_settings) const override;
};