Blender V5.0
NOD_geometry_nodes_execute.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
10#include "BLI_vector_set.hh"
11
12#include "DNA_node_types.h"
13
14#include "BKE_idprop.hh"
15
17
18struct bNodeTree;
20namespace blender::bke {
21struct GeometrySet;
22}
23struct IDProperty;
24namespace blender::nodes {
25struct GeoNodesCallData;
26namespace geo_eval_log {
27class GeoNodesLog;
28} // namespace geo_eval_log
29} // namespace blender::nodes
30
31namespace blender::nodes {
32
33constexpr StringRef input_use_attribute_suffix = "_use_attribute";
34constexpr StringRef input_attribute_name_suffix = "_attribute_name";
35
37 StringRef operator()(const IDProperty *value) const
38 {
39 return StringRef(value->name);
40 }
41};
42
43std::optional<StringRef> input_attribute_name_get(const IDProperty *properties,
44 const bNodeTreeInterfaceSocket &io_input);
45
50
55bool input_has_attribute_toggle(const bNodeTree &node_tree, const int socket_index);
56
58 const IDProperty &property,
59 bool use_name_for_ids = false);
60
61std::unique_ptr<IDProperty, bke::idprop::IDPropertyDeleter> id_property_create_from_socket(
62 const bNodeTreeInterfaceSocket &socket,
63 nodes::StructureType structure_type,
64 bool use_name_for_ids);
65
67 const IDProperty *properties,
68 const ComputeContext &base_compute_context,
69 GeoNodesCallData &call_data,
70 bke::GeometrySet input_geometry);
71
73 const IDProperty *old_properties,
74 IDProperty &properties,
75 bool use_name_for_ids = false);
76
78 const IDProperty *old_properties,
79 IDProperty &properties);
80
87 const IDProperty *properties,
88 ResourceScope &scope);
89
90} // namespace blender::nodes
eNodeSocketDatatype
KDTree_3d * tree
std::optional< StringRef > input_attribute_name_get(const IDProperty *properties, const bNodeTreeInterfaceSocket &io_input)
std::unique_ptr< IDProperty, bke::idprop::IDPropertyDeleter > id_property_create_from_socket(const bNodeTreeInterfaceSocket &socket, const nodes::StructureType structure_type, const bool use_name_for_ids)
void update_input_properties_from_node_tree(const bNodeTree &tree, const IDProperty *old_properties, IDProperty &properties, const bool use_name_for_ids)
bool input_has_attribute_toggle(const bNodeTree &node_tree, const int socket_index)
bool id_property_type_matches_socket(const bNodeTreeInterfaceSocket &socket, const IDProperty &property, const bool use_name_for_ids)
bke::GeometrySet execute_geometry_nodes_on_geometry(const bNodeTree &btree, const IDProperty *properties, const ComputeContext &base_compute_context, GeoNodesCallData &call_data, bke::GeometrySet input_geometry)
void update_output_properties_from_node_tree(const bNodeTree &tree, const IDProperty *old_properties, IDProperty &properties)
Vector< InferenceValue > get_geometry_nodes_input_inference_values(const bNodeTree &btree, const IDProperty *properties, ResourceScope &scope)
bool socket_type_has_attribute_toggle(const eNodeSocketDatatype type)
constexpr StringRef input_attribute_name_suffix
constexpr StringRef input_use_attribute_suffix
char name[64]
Definition DNA_ID.h:164
StringRef operator()(const IDProperty *value) const