Blender
V5.3
source
blender
compositor
COM_input_descriptor.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 <cstdint>
8
#include <optional>
9
10
#include "
COM_result.hh
"
11
12
namespace
blender::compositor
{
13
14
/* ------------------------------------------------------------------------------------------------
15
* Input Realization Mode
16
*
17
* Specifies how the input should be realized before execution. See the discussion in COM_domain.hh
18
* for more information on what realization mean. */
19
enum class
InputRealizationMode
:
uint8_t
{
20
/* The input should not be realized in any way. */
21
None,
22
/* The rotation and scale transforms of the input should be realized. */
23
Transforms
,
24
/* The input should be realized on the operation domain, noting that the operation domain have
25
* its transforms realized. */
26
OperationDomain
,
27
};
28
29
/* ------------------------------------------------------------------------------------------------
30
* Implicit Input Type
31
*
32
* Specifies the implicit input type that should be assigned to the input if it is unlinked. See
33
* the ImplicitInputOperation operation for more information on the individual types. */
34
enum class
ImplicitInputType
:
uint8_t
{
35
/* The input should have the uniform image coordinates of the compositing space as an input. */
36
UniformImageCoordinates
,
37
/* The input should have the scene frame as an input. */
38
SceneFrame
,
39
};
40
41
/* ------------------------------------------------------------------------------------------------
42
* Input Descriptor
43
*
44
* A class that describes an input of an operation. */
45
class
InputDescriptor
{
46
public
:
47
/* The type of input. This may be different that the type of result that the operation will
48
* receive for the input, in which case, an implicit conversion operation will be added as an
49
* input processor to convert it to the required type. */
50
ResultType
type
;
51
/* Specify how the input should be realized. */
52
InputRealizationMode
realization_mode
=
InputRealizationMode::OperationDomain
;
53
/* If not nullopt, specifies the type of implicit input in case the input in unlinked. */
54
std::optional<ImplicitInputType>
implicit_input
= std::nullopt;
55
/* The priority of the input for determining the operation domain. The non-single value input
56
* with the highest priority will be used to infer the operation domain, the highest priority
57
* being zero. See the discussion in COM_domain.hh for more information. */
58
int
domain_priority
= 0;
59
/* If true, the input expects a single value, and if a non-single value is provided, a default
60
* single value will be used instead, see the get_<type>_value_default methods in the Result
61
* class. It follows that this also implies no realization, because we don't need to realize a
62
* result that will be discarded anyways. If false, the input can work with both single and
63
* non-single values. */
64
bool
expects_single_value
=
false
;
65
/* If true, the input will not be implicitly converted to the type of the input and will be
66
* passed as is. */
67
bool
skip_type_conversion
=
false
;
68
};
69
70
}
// namespace blender::compositor
COM_result.hh
blender::compositor::InputDescriptor
Definition
COM_input_descriptor.hh:45
blender::compositor::InputDescriptor::expects_single_value
bool expects_single_value
Definition
COM_input_descriptor.hh:64
blender::compositor::InputDescriptor::skip_type_conversion
bool skip_type_conversion
Definition
COM_input_descriptor.hh:67
blender::compositor::InputDescriptor::domain_priority
int domain_priority
Definition
COM_input_descriptor.hh:58
blender::compositor::InputDescriptor::type
ResultType type
Definition
COM_input_descriptor.hh:50
blender::compositor::InputDescriptor::implicit_input
std::optional< ImplicitInputType > implicit_input
Definition
COM_input_descriptor.hh:54
blender::compositor::InputDescriptor::realization_mode
InputRealizationMode realization_mode
Definition
COM_input_descriptor.hh:52
blender::compositor
Definition
BKE_node.hh:77
blender::compositor::ImplicitInputType
ImplicitInputType
Definition
COM_input_descriptor.hh:34
blender::compositor::ImplicitInputType::SceneFrame
@ SceneFrame
Definition
COM_input_descriptor.hh:38
blender::compositor::ImplicitInputType::UniformImageCoordinates
@ UniformImageCoordinates
Definition
COM_input_descriptor.hh:36
blender::compositor::InputRealizationMode
InputRealizationMode
Definition
COM_input_descriptor.hh:19
blender::compositor::InputRealizationMode::OperationDomain
@ OperationDomain
Definition
COM_input_descriptor.hh:26
blender::compositor::InputRealizationMode::Transforms
@ Transforms
Definition
COM_input_descriptor.hh:23
blender::compositor::ResultType
ResultType
Definition
COM_result.hh:53
blender::uint8_t
unsigned char uint8_t
Definition
BKE_text.h:79
Generated on
for Blender by
doxygen
1.18.0