Blender V5.0
node_geometry_util.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
7#include <optional>
8
9#include "MEM_guardedalloc.h" // IWYU pragma: export
10
11#include "BKE_node.hh"
12#include "BKE_node_legacy_types.hh" // IWYU pragma: export
13#include "BKE_node_socket_value.hh" // IWYU pragma: export
14
15#include "NOD_geometry_exec.hh" // IWYU pragma: export
16#include "NOD_register.hh" // IWYU pragma: export
17#include "NOD_socket_declarations.hh" // IWYU pragma: export
18#include "NOD_socket_declarations_geometry.hh" // IWYU pragma: export
19
20#include "node_util.hh" // IWYU pragma: export
21
22namespace blender {
23namespace bke {
24struct BVHTreeFromMesh;
25}
26namespace nodes {
27class GatherAddNodeSearchParams;
29} // namespace nodes
30} // namespace blender
31
33 std::string idname,
34 std::optional<int16_t> legacy_type = std::nullopt);
36 const bNodeTree *ntree,
37 const char **r_disabled_hint);
38
39/* Same as geo_node_type_base but allows node use in the compositor by allowing compositor node
40 * trees in the poll function. */
42 std::string idname,
43 std::optional<int16_t> legacy_type = std::nullopt);
44
45namespace blender::nodes {
46
49
51
52void get_closest_in_bvhtree(bke::BVHTreeFromMesh &tree_data,
53 const VArray<float3> &positions,
54 const IndexMask &mask,
55 MutableSpan<int> r_indices,
56 MutableSpan<float> r_distances_sq,
57 MutableSpan<float3> r_positions);
58
62 const float factor);
63
64namespace enums {
65
66const EnumPropertyItem *attribute_type_type_with_socket_fn(bContext * /*C*/,
67 PointerRNA * /*ptr*/,
68 PropertyRNA * /*prop*/,
69 bool *r_free);
70
71bool generic_attribute_type_supported(const EnumPropertyItem &item);
72
73} // namespace enums
74
75const EnumPropertyItem *grid_data_type_socket_items_filter_fn(bContext *C,
76 PointerRNA *ptr,
77 PropertyRNA *prop,
78 bool *r_free);
79const EnumPropertyItem *grid_socket_type_items_filter_fn(bContext *C,
80 PointerRNA *ptr,
81 PropertyRNA *prop,
82 bool *r_free);
83
85
87
88void draw_data_blocks(const bContext *C, uiLayout *layout, PointerRNA &bake_rna);
89
90} // namespace blender::nodes
eNodeSocketDatatype
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
static ulong * next
bool generic_attribute_type_supported(const EnumPropertyItem &item)
const EnumPropertyItem * attribute_type_type_with_socket_fn(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
void mix_baked_data_item(eNodeSocketDatatype socket_type, SocketValueVariant &prev, const SocketValueVariant &next, const float factor)
void search_link_ops_for_tool_node(GatherLinkSearchOpParams &params)
void draw_data_blocks(const bContext *C, uiLayout *layout, PointerRNA &bake_rna)
bool check_tool_context_and_error(GeoNodeExecParams &params)
const EnumPropertyItem * grid_socket_type_items_filter_fn(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
const EnumPropertyItem * grid_data_type_socket_items_filter_fn(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
void get_closest_in_bvhtree(bke::BVHTreeFromMesh &tree_data, const VArray< float3 > &positions, const IndexMask &mask, MutableSpan< int > r_indices, MutableSpan< float > r_distances_sq, MutableSpan< float3 > r_positions)
void node_geo_sdf_grid_error_not_levelset(GeoNodeExecParams &params)
void node_geo_exec_with_missing_openvdb(GeoNodeExecParams &params)
void node_geo_exec_with_too_old_openvdb(GeoNodeExecParams &params)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, std::optional< int16_t > legacy_type=std::nullopt)
bool geo_node_poll_default(const blender::bke::bNodeType *ntype, const bNodeTree *ntree, const char **r_disabled_hint)
void geo_cmp_node_type_base(blender::bke::bNodeType *ntype, std::string idname, std::optional< int16_t > legacy_type=std::nullopt)
Defines a node type.
Definition BKE_node.hh:238
PointerRNA * ptr
Definition wm_files.cc:4238