Blender V4.3
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 "MEM_guardedalloc.h"
8
9#include "BKE_node.hh"
11
12#include "NOD_geometry_exec.hh"
13#include "NOD_register.hh"
16
17#include "node_util.hh"
18
19struct BVHTreeFromMesh;
20namespace blender::nodes {
21class GatherAddNodeSearchParams;
23} // namespace blender::nodes
24
25void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass);
27 const bNodeTree *ntree,
28 const char **r_disabled_hint);
29
30namespace blender::nodes {
31
36
37void get_closest_in_bvhtree(BVHTreeFromMesh &tree_data,
38 const VArray<float3> &positions,
39 const IndexMask &mask,
40 MutableSpan<int> r_indices,
41 MutableSpan<float> r_distances_sq,
42 MutableSpan<float3> r_positions);
43
44int apply_offset_in_cyclic_range(IndexRange range, int start_index, int offset);
45
47 void *prev,
48 const void *next,
49 const float factor);
50
51namespace enums {
52
53const EnumPropertyItem *attribute_type_type_with_socket_fn(bContext * /*C*/,
54 PointerRNA * /*ptr*/,
55 PropertyRNA * /*prop*/,
56 bool *r_free);
57
58bool generic_attribute_type_supported(const EnumPropertyItem &item);
59
60} // namespace enums
61
63const EnumPropertyItem *grid_custom_data_type_items_filter_fn(bContext *C,
64 PointerRNA *ptr,
65 PropertyRNA *prop,
66 bool *r_free);
67const EnumPropertyItem *grid_socket_type_items_filter_fn(bContext *C,
68 PointerRNA *ptr,
69 PropertyRNA *prop,
70 bool *r_free);
71
73
74void draw_data_blocks(const bContext *C, uiLayout *layout, PointerRNA &bake_rna);
75
76} // namespace blender::nodes
eNodeSocketDatatype
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
ccl_device_inline float4 mask(const int4 mask, const float4 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)
bool custom_data_type_supports_grids(const eCustomDataType data_type)
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)
void search_link_ops_for_import_node(GatherLinkSearchOpParams &params)
void get_closest_in_bvhtree(BVHTreeFromMesh &tree_data, const VArray< float3 > &positions, const IndexMask &mask, MutableSpan< int > r_indices, MutableSpan< float > r_distances_sq, MutableSpan< float3 > r_positions)
const EnumPropertyItem * grid_custom_data_type_items_filter_fn(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
const EnumPropertyItem * grid_socket_type_items_filter_fn(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
int apply_offset_in_cyclic_range(IndexRange range, int start_index, int offset)
void search_link_ops_for_volume_grid_node(GatherLinkSearchOpParams &params)
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, int type, const char *name, short nclass)
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:218
PointerRNA * ptr
Definition wm_files.cc:4126