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:
authorOmar Emara <mail@OmarEmara.dev>2022-08-10 11:36:57 +0300
committerOmar Emara <mail@OmarEmara.dev>2022-08-10 11:36:57 +0300
commitfad112be1c6a06f6412b7c19379032008c733563 (patch)
treeade70fab5d3433c6c9c2796c700e92b3c0e71a70 /source/blender/nodes/composite/nodes/node_composite_output_file.cc
parent40c45985a924e2e2310d5c51cf399150d557792c (diff)
Realtime Compositor: Add stub unsupported nodes
This patch adds a stub implementation for all unsupported nodes. The inputs are passed through to the outputs where it make sense, while other outputs will be allocated a single zero value. This seems to be preferred by users as opposed to stopping execution and displaying an error message. Differential Revision: https://developer.blender.org/D15464 Reviewed By: Clement Foucault
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_output_file.cc')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_output_file.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_output_file.cc b/source/blender/nodes/composite/nodes/node_composite_output_file.cc
index 84235b085a4..5ed383977a5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_output_file.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_output_file.cc
@@ -24,6 +24,8 @@
#include "IMB_openexr.h"
+#include "COM_node_operation.hh"
+
#include "node_composite_util.hh"
/* **************** OUTPUT FILE ******************** */
@@ -439,6 +441,22 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
}
}
+using namespace blender::realtime_compositor;
+
+class OutputFileOperation : public NodeOperation {
+ public:
+ using NodeOperation::NodeOperation;
+
+ void execute() override
+ {
+ }
+};
+
+static NodeOperation *get_compositor_operation(Context &context, DNode node)
+{
+ return new OutputFileOperation(context, node);
+}
+
} // namespace blender::nodes::node_composite_output_file_cc
void register_node_type_cmp_output_file()
@@ -455,6 +473,7 @@ void register_node_type_cmp_output_file()
node_type_storage(
&ntype, "NodeImageMultiFile", file_ns::free_output_file, file_ns::copy_output_file);
node_type_update(&ntype, file_ns::update_output_file);
+ ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}