Blender V4.3
node_multi_function.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
7#include "BKE_node_runtime.hh"
8
9namespace blender::nodes {
10
12{
13 tree.ensure_topology_cache();
14 for (const bNode *bnode : tree.all_nodes()) {
15 if (bnode->typeinfo->build_multi_function == nullptr) {
16 continue;
17 }
18 NodeMultiFunctionBuilder builder{*bnode, tree};
19 bnode->typeinfo->build_multi_function(builder);
20 if (builder.built_fn_ != nullptr) {
21 map_.add_new(bnode, {builder.built_fn_, std::move(builder.owned_built_fn_)});
22 }
23 }
24}
25
26} // namespace blender::nodes
KDTree_3d * tree