Blender V4.5
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
39namespace blender::nodes {
40
44
45void get_closest_in_bvhtree(bke::BVHTreeFromMesh &tree_data,
46 const VArray<float3> &positions,
47 const IndexMask &mask,
48 MutableSpan<int> r_indices,
49 MutableSpan<float> r_distances_sq,
50 MutableSpan<float3> r_positions);
51
53 void *prev,
54 const void *next,
55 const float factor);
56
57namespace enums {
58
59const EnumPropertyItem *attribute_type_type_with_socket_fn(bContext * /*C*/,
60 PointerRNA * /*ptr*/,
61 PropertyRNA * /*prop*/,
62 bool *r_free);
63
64bool generic_attribute_type_supported(const EnumPropertyItem &item);
65
66} // namespace enums
67
68const EnumPropertyItem *grid_data_type_socket_items_filter_fn(bContext *C,
69 PointerRNA *ptr,
70 PropertyRNA *prop,
71 bool *r_free);
72const EnumPropertyItem *grid_socket_type_items_filter_fn(bContext *C,
73 PointerRNA *ptr,
74 PropertyRNA *prop,
75 bool *r_free);
76
78
79void draw_data_blocks(const bContext *C, uiLayout *layout, PointerRNA &bake_rna);
80
81} // 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 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)
void search_link_ops_for_volume_grid_node(GatherLinkSearchOpParams &params)
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 mix_baked_data_item(eNodeSocketDatatype socket_type, void *prev, const void *next, const float factor)
void node_geo_exec_with_missing_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)
Defines a node type.
Definition BKE_node.hh:226
PointerRNA * ptr
Definition wm_files.cc:4227