Blender V5.0
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
11namespace 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. */
18enum class InputRealizationMode : uint8_t {
19 /* The input should not be realized in any way. */
21 /* The rotation and scale transforms of the input should be realized. */
23 /* The input should be realized on the operation domain, noting that the operation domain have
24 * its transforms realized. */
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. */
33enum class ImplicitInput : uint8_t {
34 /* The input does not have an implicit input and its value should be used. */
36 /* The input should have the texture coordinates of the compositing space as an input. */
38};
39
40/* ------------------------------------------------------------------------------------------------
41 * Input Descriptor
42 *
43 * A class that describes an input of an operation. */
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. */
50 /* Specify how the input should be realized. */
52 /* Specifies the type of implicit input in case the input in unlinked. */
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. */
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. */
64 /* If true, the input will not be implicitly converted to the type of the input and will be
65 * passed as is. */
67};
68
69} // namespace blender::compositor