Blender
V5.3
source
blender
compositor
COM_single_value_node_input_operation.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
BLI_string_ref.hh
"
8
9
#include "
COM_context.hh
"
10
#include "
COM_operation.hh
"
11
#include "
COM_result.hh
"
12
13
namespace
blender::compositor
{
14
15
/* ------------------------------------------------------------------------------------------------
16
* Single Value Node Input Operation
17
*
18
* An operation that outputs a single value result whose value is the value of an unlinked input
19
* socket. This is typically used to initialize the values of unlinked node input sockets. */
20
class
SingleValueNodeInputOperation
:
public
Operation
{
21
private
:
22
/* The identifier of the output. */
23
static
const
StringRef
output_identifier_;
24
/* The input socket whose value will be computed as the operation's result. */
25
const
bNodeSocket
&input_socket_;
26
27
public
:
28
SingleValueNodeInputOperation
(
Context
&
context
,
const
bNodeSocket
&input_socket);
29
30
/* Allocate a single value result and set its value to the default value of the input socket. */
31
void
execute
()
override
;
32
33
/* Get a reference to the output result of the operation, this essentially calls the super
34
* get_result with the output identifier of the operation. */
35
Result
&
get_result
();
36
37
private
:
38
/* Populate the result of the operation, this essentially calls the super populate_result method
39
* with the output identifier of the operation. */
40
void
populate_result(
ResultType
type);
41
};
42
43
}
// namespace blender::compositor
BLI_string_ref.hh
COM_context.hh
COM_operation.hh
COM_result.hh
blender::StringRef
Definition
BLI_string_ref.hh:165
blender::compositor::Context
Definition
COM_context.hh:53
blender::compositor::Operation::Operation
Operation(Context &context)
Definition
operation.cc:22
blender::compositor::Operation::context
Context & context() const
Definition
operation.cc:57
blender::compositor::Result
Definition
COM_result.hh:125
blender::compositor::SingleValueNodeInputOperation::SingleValueNodeInputOperation
SingleValueNodeInputOperation(Context &context, const bNodeSocket &input_socket)
Definition
single_value_node_input_operation.cc:27
blender::compositor::SingleValueNodeInputOperation::get_result
Result & get_result()
Definition
single_value_node_input_operation.cc:170
blender::compositor::SingleValueNodeInputOperation::execute
void execute() override
Definition
single_value_node_input_operation.cc:34
blender::compositor
Definition
BKE_node.hh:77
blender::compositor::ResultType
ResultType
Definition
COM_result.hh:53
blender::bNodeSocket
Definition
DNA_node_types.h:1447
Generated on
for Blender by
doxygen
1.18.0