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-09-09 15:22:03 +0300
committerOmar Emara <mail@OmarEmara.dev>2022-09-09 15:22:03 +0300
commit03f33a6f237fba668d5caf900d9bdec73e366fef (patch)
tree6236dfa145a57e308dd2ce7411c3ac4a4264a5c5 /source/blender/nodes
parent0fd39da3a96adfe30e5260f72ecc8c6d8b68b98f (diff)
Realtime Compositor: Allow inputs to skip realization
This patch adds support for the skip realization option of the input descriptor. Inputs that request skip realization will not be realized on the operation domain of the operation and will not contribute to its computation, and consequently, they can't be a domain input. An example is the bokeh input of the Bokeh Blur node, which is actually a resource that is decoupled from the rest of the inputs and should not affect or be affected by their domain. Differential Revision: https://developer.blender.org/D15767 Reviewed By: Clement Foucault
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/NOD_node_declaration.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_node_declaration.hh b/source/blender/nodes/NOD_node_declaration.hh
index d8b8c354230..42755b2e8dd 100644
--- a/source/blender/nodes/NOD_node_declaration.hh
+++ b/source/blender/nodes/NOD_node_declaration.hh
@@ -92,6 +92,10 @@ class SocketDeclaration {
* realtime_compositor::InputDescriptor for more information. */
int compositor_domain_priority_ = 0;
+ /** This input shouldn't be realized on the operation domain of the node. See
+ * realtime_compositor::InputDescriptor for more information. */
+ bool compositor_skip_realization_ = false;
+
/** This input expects a single value and can't operate on non-single values. See
* realtime_compositor::InputDescriptor for more information. */
bool compositor_expects_single_value_ = false;
@@ -133,6 +137,7 @@ class SocketDeclaration {
const OutputFieldDependency &output_field_dependency() const;
int compositor_domain_priority() const;
+ bool compositor_skip_realization() const;
bool compositor_expects_single_value() const;
protected:
@@ -257,6 +262,14 @@ class SocketDeclarationBuilder : public BaseSocketDeclarationBuilder {
return *(Self *)this;
}
+ /** This input shouldn't be realized on the operation domain of the node. See
+ * realtime_compositor::InputDescriptor for more information. */
+ Self &compositor_skip_realization(bool value = true)
+ {
+ decl_->compositor_skip_realization_ = value;
+ return *(Self *)this;
+ }
+
/** This input expects a single value and can't operate on non-single values. See
* realtime_compositor::InputDescriptor for more information. */
Self &compositor_expects_single_value(bool value = true)
@@ -460,6 +473,11 @@ inline int SocketDeclaration::compositor_domain_priority() const
return compositor_domain_priority_;
}
+inline bool SocketDeclaration::compositor_skip_realization() const
+{
+ return compositor_skip_realization_;
+}
+
inline bool SocketDeclaration::compositor_expects_single_value() const
{
return compositor_expects_single_value_;