Blender V4.5
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
16struct bNodeTree;
18namespace blender::bke {
19struct GeometrySet;
20}
21struct IDProperty;
22namespace blender::nodes {
23struct GeoNodesCallData;
24namespace geo_eval_log {
25class GeoNodesLog;
26} // namespace geo_eval_log
27} // namespace blender::nodes
28
29namespace blender::nodes {
30
31constexpr StringRef input_use_attribute_suffix = "_use_attribute";
32constexpr StringRef input_attribute_name_suffix = "_attribute_name";
33
35 StringRef operator()(const IDProperty *value) const
36 {
37 return StringRef(value->name);
38 }
39};
40
47
48std::optional<StringRef> input_attribute_name_get(const PropertiesVectorSet &properties,
49 const bNodeTreeInterfaceSocket &io_input);
50
55
60bool input_has_attribute_toggle(const bNodeTree &node_tree, const int socket_index);
61
63 const IDProperty &property,
64 bool use_name_for_ids = false);
65
66std::unique_ptr<IDProperty, bke::idprop::IDPropertyDeleter> id_property_create_from_socket(
67 const bNodeTreeInterfaceSocket &socket,
68 nodes::StructureType structure_type,
69 bool use_name_for_ids);
70
72 const PropertiesVectorSet &properties_set,
73 const ComputeContext &base_compute_context,
74 GeoNodesCallData &call_data,
75 bke::GeometrySet input_geometry);
76
78 const IDProperty *old_properties,
79 IDProperty &properties,
80 bool use_name_for_ids = false);
81
83 const IDProperty *old_properties,
84 IDProperty &properties);
85
93 const PropertiesVectorSet &properties,
94 ResourceScope &scope,
95 MutableSpan<GPointer> r_values);
96
97} // namespace blender::nodes
eNodeSocketDatatype
KDTree_3d * tree
bke::GeometrySet execute_geometry_nodes_on_geometry(const bNodeTree &btree, const PropertiesVectorSet &properties_set, const ComputeContext &base_compute_context, GeoNodesCallData &call_data, bke::GeometrySet input_geometry)
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)
PropertiesVectorSet build_properties_vector_set(const IDProperty *properties)
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)
CustomIDVectorSet< IDProperty *, IDPropNameGetter, 16 > PropertiesVectorSet
void update_output_properties_from_node_tree(const bNodeTree &tree, const IDProperty *old_properties, IDProperty &properties)
void get_geometry_nodes_input_base_values(const bNodeTree &btree, const PropertiesVectorSet &properties, ResourceScope &scope, MutableSpan< GPointer > r_values)
bool socket_type_has_attribute_toggle(const eNodeSocketDatatype type)
constexpr StringRef input_attribute_name_suffix
constexpr StringRef input_use_attribute_suffix
std::optional< StringRef > input_attribute_name_get(const PropertiesVectorSet &properties, const bNodeTreeInterfaceSocket &io_input)
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
char name[64]
Definition DNA_ID.h:154
StringRef operator()(const IDProperty *value) const