Blender
V4.5
source
blender
nodes
intern
geometry_nodes_closure.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2025 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#include "
NOD_geometry_nodes_closure.hh
"
6
7
namespace
blender::nodes
{
8
9
std::optional<int>
ClosureSignature::find_input_index
(
const
SocketInterfaceKey
&
key
)
const
10
{
11
for
(
const
int
i : this->
inputs
.
index_range
()) {
12
const
Item
&item = this->
inputs
[i];
13
if
(item.
key
.
matches
(
key
)) {
14
return
i;
15
}
16
}
17
return
std::nullopt;
18
}
19
20
std::optional<int>
ClosureSignature::find_output_index
(
const
SocketInterfaceKey
&
key
)
const
21
{
22
for
(
const
int
i : this->
outputs
.
index_range
()) {
23
const
Item
&item = this->
outputs
[i];
24
if
(item.
key
.
matches
(
key
)) {
25
return
i;
26
}
27
}
28
return
std::nullopt;
29
}
30
31
}
// namespace blender::nodes
key
int key
Definition
BLI_set_test.cc:631
NOD_geometry_nodes_closure.hh
blender::Vector::index_range
IndexRange index_range() const
Definition
BLI_vector.hh:1017
blender::nodes::ClosureSignature::find_input_index
std::optional< int > find_input_index(const SocketInterfaceKey &key) const
Definition
geometry_nodes_closure.cc:9
blender::nodes::ClosureSignature::find_output_index
std::optional< int > find_output_index(const SocketInterfaceKey &key) const
Definition
geometry_nodes_closure.cc:20
blender::nodes::ClosureSignature::outputs
Vector< Item > outputs
Definition
NOD_geometry_nodes_closure.hh:28
blender::nodes::ClosureSignature::inputs
Vector< Item > inputs
Definition
NOD_geometry_nodes_closure.hh:27
blender::nodes::SocketInterfaceKey
Definition
NOD_socket_interface_key.hh:19
blender::nodes::SocketInterfaceKey::matches
bool matches(const SocketInterfaceKey &other) const
Definition
blenkernel/intern/geometry_nodes_bundle.cc:26
blender::nodes
Definition
BKE_compute_contexts.hh:29
blender::nodes::ClosureSignature::Item
Definition
NOD_geometry_nodes_closure.hh:22
blender::nodes::ClosureSignature::Item::key
SocketInterfaceKey key
Definition
NOD_geometry_nodes_closure.hh:23
Generated on Fri Apr 3 2026 06:33:18 for Blender by
doxygen
1.11.0