See: https://projects.blender.org/blender/blender/issues/103343 Changes: 1. Added `BKE_node.hh` file. New file includes old one. 2. Functions moved to new file. Redundant `(void)`, `struct` are removed. 3. All cpp includes replaced from `.h` on `.hh`. 4. Everything in `BKE_node.hh` is on `blender::bke` namespace. 5. All implementation functions moved in namespace. 6. Function names (`BKE_node_*`) changed to `blender::bke::node_*`. 7. `eNodeSizePreset` now is a class, with renamed items. Pull Request: https://projects.blender.org/blender/blender/pulls/107790
26 lines
664 B
C++
26 lines
664 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "NOD_multi_function.hh"
|
|
|
|
#include "BKE_node.hh"
|
|
#include "BKE_node_runtime.hh"
|
|
|
|
namespace blender::nodes {
|
|
|
|
NodeMultiFunctions::NodeMultiFunctions(const bNodeTree &tree)
|
|
{
|
|
tree.ensure_topology_cache();
|
|
for (const bNode *bnode : tree.all_nodes()) {
|
|
if (bnode->typeinfo->build_multi_function == nullptr) {
|
|
continue;
|
|
}
|
|
NodeMultiFunctionBuilder builder{*bnode, tree};
|
|
bnode->typeinfo->build_multi_function(builder);
|
|
if (builder.built_fn_ != nullptr) {
|
|
map_.add_new(bnode, {builder.built_fn_, std::move(builder.owned_built_fn_)});
|
|
}
|
|
}
|
|
}
|
|
|
|
} // namespace blender::nodes
|