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