Blender V5.3
node_geo_blur_attribute.cc
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#include "BLI_array.hh"
7#include "BLI_index_mask.hh"
8#include "BLI_index_range.hh"
9#include "BLI_span.hh"
10#include "BLI_task.hh"
11#include "BLI_virtual_array.hh"
12
13#include "BKE_attribute_math.hh"
14#include "BKE_curves.hh"
16#include "BKE_mesh.hh"
17#include "BKE_mesh_mapping.hh"
18
19#include "NOD_rna_define.hh"
20
22#include "UI_resources.hh"
23
24#include "RNA_enum_types.hh"
25
27
28#include "node_geometry_util.hh"
29
31
33{
34 b.use_custom_socket_order();
35 b.allow_any_socket_order();
36 b.add_default_layout();
37 const bNode *node = b.node_or_null();
38
39 if (node != nullptr) {
40 const eCustomDataType data_type = eCustomDataType(node->custom1);
41 b.add_input(data_type, "Value"_ustr)
42 .structure_type(StructureType::Field)
43 .hide_value()
44 .is_default_link_socket();
45 b.add_output(data_type, "Value"_ustr)
46 .structure_type(StructureType::Field)
47 .propagate_references()
48 .align_with_previous();
49 }
50 b.add_input<decl::Int>("Iterations"_ustr)
51 .default_value(1)
52 .min(0)
53 .description("How many times to blur the values for all elements");
54 b.add_input<decl::Float>("Weight"_ustr)
55 .default_value(1.0f)
57 .min(0.0f)
58 .max(1.0f)
59 .structure_type(StructureType::Field)
60 .description("Relative mix weight of neighboring elements");
61}
62
63static void node_layout(ui::Layout &layout, bContext * /*C*/, PointerRNA *ptr)
64{
65 layout.prop(ptr, "data_type", UI_ITEM_NONE, "", ICON_NONE);
66}
67
68static void node_init(bNodeTree * /*tree*/, bNode *node)
69{
70 node->custom1 = CD_PROP_FLOAT;
71}
72
74{
75 const bke::bNodeType &node_type = params.node_type();
76 const NodeDeclaration &declaration = *node_type.static_declaration;
77
78 /* Weight and Iterations inputs don't change based on the data type. */
79 search_link_ops_for_declarations(params, declaration.inputs);
80
81 const std::optional<eCustomDataType> new_node_type = bke::socket_type_to_custom_data_type(
82 params.other_socket().type);
83 if (!new_node_type.has_value()) {
84 return;
85 }
86 eCustomDataType fixed_data_type = *new_node_type;
87 if (fixed_data_type == CD_PROP_STRING) {
88 return;
89 }
90 if (fixed_data_type == CD_PROP_QUATERNION) {
91 fixed_data_type = CD_PROP_FLOAT3;
92 }
93 if (fixed_data_type == CD_PROP_FLOAT4X4) {
94 /* Don't implement matrix blurring for now. */
95 return;
96 }
97 if (fixed_data_type == CD_PROP_BOOL) {
98 /* This node does not support boolean sockets, use integer instead. */
99 fixed_data_type = CD_PROP_INT32;
100 }
101 params.add_item(IFACE_("Value"), [node_type, fixed_data_type](LinkSearchOpParams &params) {
102 bNode &node = params.add_node(node_type);
103 node.custom1 = fixed_data_type;
104 params.update_and_connect_available_socket(node, "Value"_ustr);
105 });
106}
107
109 const int verts_num,
110 Array<int> &r_offsets,
111 Array<int> &r_indices)
112{
113 bke::mesh::build_vert_to_edge_map(edges, verts_num, r_offsets, r_indices);
114 const OffsetIndices<int> offsets(r_offsets);
115 threading::parallel_for(IndexRange(verts_num), 2048, [&](const IndexRange range) {
116 for (const int vert : range) {
117 MutableSpan<int> neighbors = r_indices.as_mutable_span().slice(offsets[vert]);
118 for (const int i : neighbors.index_range()) {
119 neighbors[i] = bke::mesh::edge_other_vert(edges[neighbors[i]], vert);
120 }
121 }
122 });
123}
124
126 const int verts_num,
127 Array<int> &r_offsets,
128 Array<int> &r_indices)
129{
130 Array<int> vert_to_edge_offset_data;
131 Array<int> vert_to_edge_indices;
133 edges, verts_num, vert_to_edge_offset_data, vert_to_edge_indices);
134 const OffsetIndices<int> vert_to_edge_offsets(vert_to_edge_offset_data);
135
136 r_offsets = Array<int>(edges.size() + 1, 0);
137 threading::parallel_for(edges.index_range(), 1024, [&](const IndexRange range) {
138 for (const int edge_i : range) {
139 const int2 edge = edges[edge_i];
140 r_offsets[edge_i] = vert_to_edge_offsets[edge[0]].size() - 1 +
141 vert_to_edge_offsets[edge[1]].size() - 1;
142 }
143 });
145 r_indices.reinitialize(offsets.total_size());
146
147 threading::parallel_for(edges.index_range(), 1024, [&](const IndexRange range) {
148 for (const int edge_i : range) {
149 const int2 edge = edges[edge_i];
150 MutableSpan<int> neighbors = r_indices.as_mutable_span().slice(offsets[edge_i]);
151 int count = 0;
152 for (const Span<int> neighbor_edges : {vert_to_edge[edge[0]], vert_to_edge[edge[1]]}) {
153 for (const int neighbor_edge : neighbor_edges) {
154 if (neighbor_edge != edge_i) {
155 neighbors[count] = neighbor_edge;
156 count++;
157 }
158 }
159 }
160 }
161 });
162}
163
165 const Span<int> corner_edges,
166 const int edges_num,
167 Array<int> &r_offsets,
168 Array<int> &r_indices)
169{
170 Array<int> edge_to_face_offset_data;
171 Array<int> edge_to_face_indices;
173 faces, corner_edges, edges_num, edge_to_face_offset_data, edge_to_face_indices);
174 const OffsetIndices<int> edge_to_face_offsets(edge_to_face_offset_data);
175
176 r_offsets = Array<int>(faces.size() + 1, 0);
177 threading::parallel_for(faces.index_range(), 4096, [&](const IndexRange range) {
178 for (const int face_i : range) {
179 for (const int edge : corner_edges.slice(faces[face_i])) {
180 /* Subtract face itself from the number of faces connected to the edge. */
181 r_offsets[face_i] += edge_to_face_offsets[edge].size() - 1;
182 }
183 }
184 });
186 r_indices.reinitialize(offsets.total_size());
187
188 threading::parallel_for(faces.index_range(), 1024, [&](IndexRange range) {
189 for (const int face_i : range) {
190 MutableSpan<int> neighbors = r_indices.as_mutable_span().slice(offsets[face_i]);
191 if (neighbors.is_empty()) {
192 continue;
193 }
194 int count = 0;
195 for (const int edge : corner_edges.slice(faces[face_i])) {
196 for (const int neighbor : edge_to_face_map[edge]) {
197 if (neighbor != face_i) {
198 neighbors[count] = neighbor;
199 count++;
200 }
201 }
202 }
203 }
204 });
205}
206
207static void build_corner_to_corner_by_vert_map(const GroupedSpan<int> vert_to_corner_map,
208 const OffsetIndices<int> faces,
209 const Span<int> corner_verts,
210 const int corners_num,
211 Array<int> &r_offsets,
212 Array<int> &r_indices)
213{
214 r_offsets = Array<int>(corners_num + 1, 0);
215 threading::parallel_for(faces.index_range(), 4096, [&](const IndexRange range) {
216 for (const int face : range) {
217 for (const int corner : faces[face]) {
218 const int vert = corner_verts[corner];
219 constexpr int self_corner = -1;
220 constexpr int prev_and_next_corners = 2;
221 r_offsets[corner] += vert_to_corner_map.offsets[vert].size() + self_corner +
222 prev_and_next_corners;
223 }
224 }
225 });
227 r_indices.reinitialize(offsets.total_size());
228
229 threading::parallel_for(faces.index_range(), 4096, [&](IndexRange range) {
230 for (const int face : range) {
231 for (const int corner : faces[face]) {
232 const int vert = corner_verts[corner];
233 const int prev_corner = bke::mesh::face_corner_prev(faces[face], corner);
234 const int next_corner = bke::mesh::face_corner_next(faces[face], corner);
235
236 MutableSpan<int> neighbors = r_indices.as_mutable_span().slice(offsets[corner]);
237
238 MutableSpan<int> vert_neighbors = neighbors.drop_back(1);
239 vert_neighbors.copy_from(vert_to_corner_map[vert]);
240
241 int *self_corner = std::find(vert_neighbors.begin(), vert_neighbors.end(), corner);
242 *self_corner = prev_corner;
243
244 neighbors.last() = next_corner;
245 }
246 }
247 });
248}
249
251 const AttrDomain domain,
252 Array<int> &r_offsets,
253 Array<int> &r_indices)
254{
255 switch (domain) {
256 case AttrDomain::Point:
257 build_vert_to_vert_by_edge_map(mesh.edges(), mesh.verts_num, r_offsets, r_indices);
258 break;
259 case AttrDomain::Edge:
260 build_edge_to_edge_by_vert_map(mesh.edges(), mesh.verts_num, r_offsets, r_indices);
261 break;
262 case AttrDomain::Face:
264 mesh.faces(), mesh.corner_edges(), mesh.edges_num, r_offsets, r_indices);
265 break;
266 case AttrDomain::Corner:
267 build_corner_to_corner_by_vert_map(mesh.vert_to_corner_map(),
268 mesh.faces(),
269 mesh.corner_verts(),
270 mesh.corners_num,
271 r_offsets,
272 r_indices);
273 break;
274 default:
276 break;
277 }
278 return {OffsetIndices<int>(r_offsets), r_indices};
279}
280
281template<typename T>
282static Span<T> blur_on_mesh_exec(const Span<float> neighbor_weights,
283 const GroupedSpan<int> neighbors_map,
284 const int iterations,
285 const MutableSpan<T> buffer_a,
286 const MutableSpan<T> buffer_b)
287{
288 /* Source is set to buffer_b even though it is actually in buffer_a because the loop below starts
289 * with swapping both. */
290 MutableSpan<T> src = buffer_b;
291 MutableSpan<T> dst = buffer_a;
292
293 for ([[maybe_unused]] const int64_t iteration : IndexRange(iterations)) {
294 std::swap(src, dst);
296 threading::parallel_for(dst.index_range(), 1024, [&](const IndexRange range) {
297 for (const int64_t index : range) {
298 const Span<int> neighbors = neighbors_map[index];
299 const float neighbor_weight = neighbor_weights[index];
300 mixer.set(index, src[index], 1.0f);
301 for (const int neighbor : neighbors) {
302 mixer.mix_in(index, src[neighbor], neighbor_weight);
303 }
304 }
305 mixer.finalize(range);
306 });
307 }
308
309 return dst;
310}
311
312template<typename Func> static void to_static_type_for_blur(const CPPType &type, const Func &func)
313{
314 type.to_static_type<int, float, float3, ColorGeometry4f>([&]<typename T>() { func(T()); });
315}
316
318 const AttrDomain domain,
319 const int iterations,
320 const Span<float> neighbor_weights,
321 const GMutableSpan buffer_a,
322 const GMutableSpan buffer_b)
323{
324 Array<int> neighbor_offsets;
325 Array<int> neighbor_indices;
326 const GroupedSpan<int> neighbors_map = create_mesh_map(
327 mesh, domain, neighbor_offsets, neighbor_indices);
328
329 GSpan result_buffer;
330 to_static_type_for_blur(buffer_a.type(), [&](auto dummy) {
331 using T = decltype(dummy);
332 result_buffer = blur_on_mesh_exec<T>(
333 neighbor_weights, neighbors_map, iterations, buffer_a.typed<T>(), buffer_b.typed<T>());
334 });
335 return result_buffer;
336}
337
338template<typename T>
340 const Span<float> neighbor_weights,
341 const int iterations,
342 const MutableSpan<T> buffer_a,
343 const MutableSpan<T> buffer_b)
344{
345 MutableSpan<T> src = buffer_b;
346 MutableSpan<T> dst = buffer_a;
347
348 const OffsetIndices points_by_curve = curves.points_by_curve();
349 const VArray<bool> cyclic = curves.cyclic();
350
351 for ([[maybe_unused]] const int iteration : IndexRange(iterations)) {
352 std::swap(src, dst);
354 threading::parallel_for(curves.curves_range(), 256, [&](const IndexRange range) {
355 for (const int curve_i : range) {
356 const IndexRange points = points_by_curve[curve_i];
357 if (points.size() == 1) {
358 /* No mixing possible. */
359 const int point_i = points[0];
360 mixer.set(point_i, src[point_i], 1.0f);
361 continue;
362 }
363 /* Inner points. */
364 for (const int point_i : points.drop_front(1).drop_back(1)) {
365 const float neighbor_weight = neighbor_weights[point_i];
366 mixer.set(point_i, src[point_i], 1.0f);
367 mixer.mix_in(point_i, src[point_i - 1], neighbor_weight);
368 mixer.mix_in(point_i, src[point_i + 1], neighbor_weight);
369 }
370 const int first_i = points[0];
371 const float first_neighbor_weight = neighbor_weights[first_i];
372 const int last_i = points.last();
373 const float last_neighbor_weight = neighbor_weights[last_i];
374
375 /* First point. */
376 mixer.set(first_i, src[first_i], 1.0f);
377 mixer.mix_in(first_i, src[first_i + 1], first_neighbor_weight);
378 /* Last point. */
379 mixer.set(last_i, src[last_i], 1.0f);
380 mixer.mix_in(last_i, src[last_i - 1], last_neighbor_weight);
381
382 if (cyclic[curve_i]) {
383 /* First point. */
384 mixer.mix_in(first_i, src[last_i], first_neighbor_weight);
385 /* Last point. */
386 mixer.mix_in(last_i, src[first_i], last_neighbor_weight);
387 }
388 }
389 mixer.finalize(points_by_curve[range]);
390 });
391 }
392
393 return dst;
394}
395
397 const int iterations,
398 const Span<float> neighbor_weights,
399 const GMutableSpan buffer_a,
400 const GMutableSpan buffer_b)
401{
402 GSpan result_buffer;
403 to_static_type_for_blur(buffer_a.type(), [&](auto dummy) {
404 using T = decltype(dummy);
405 result_buffer = blur_on_curve_exec<T>(
406 curves, neighbor_weights, iterations, buffer_a.typed<T>(), buffer_b.typed<T>());
407 });
408 return result_buffer;
409}
410
412 private:
413 const Field<float> weight_field_;
414 const GField value_field_;
415 const int iterations_;
416
417 public:
418 BlurAttributeFieldInput(Field<float> weight_field, GField value_field, const int iterations)
419 : bke::GeometryFieldInput(value_field.cpp_type(), "Blur Attribute"),
420 weight_field_(std::move(weight_field)),
421 value_field_(std::move(value_field)),
422 iterations_(iterations)
423 {
424 }
425
427 const IndexMask & /*mask*/) const final
428 {
429 const int64_t domain_size = context.attributes()->domain_size(context.domain());
430
431 GArray<> buffer_a(*type_, domain_size);
432
433 FieldEvaluator evaluator(context, domain_size);
434
435 evaluator.add_with_destination(value_field_, buffer_a.as_mutable_span());
436 evaluator.add(weight_field_);
437 evaluator.evaluate();
438
439 /* Blurring does not make sense with a less than 2 elements. */
440 if (domain_size <= 1) {
441 return GVArray::from_garray(std::move(buffer_a));
442 }
443
444 if (iterations_ <= 0) {
445 return GVArray::from_garray(std::move(buffer_a));
446 }
447
448 VArraySpan<float> neighbor_weights = evaluator.get_evaluated<float>(1);
449 GArray<> buffer_b(*type_, domain_size);
450
451 GSpan result_buffer = buffer_a.as_span();
452 switch (context.type()) {
454 if (ELEM(context.domain(),
455 AttrDomain::Point,
456 AttrDomain::Edge,
457 AttrDomain::Face,
458 AttrDomain::Corner))
459 {
460 if (const Mesh *mesh = context.mesh()) {
461 result_buffer = blur_on_mesh(
462 *mesh, context.domain(), iterations_, neighbor_weights, buffer_a, buffer_b);
463 }
464 }
465 break;
468 if (context.domain() == AttrDomain::Point) {
469 if (const bke::CurvesGeometry *curves = context.curves_or_strokes()) {
470 result_buffer = blur_on_curves(
471 *curves, iterations_, neighbor_weights, buffer_a, buffer_b);
472 }
473 }
474 break;
475 default:
476 break;
477 }
478
479 BLI_assert(ELEM(result_buffer.data(), buffer_a.data(), buffer_b.data()));
480 if (result_buffer.data() == buffer_a.data()) {
481 return GVArray::from_garray(std::move(buffer_a));
482 }
483 return GVArray::from_garray(std::move(buffer_b));
484 }
485
486 void foreach_recursive_field(FunctionRef<void(const GField &)> fn) const override
487 {
488 fn(weight_field_);
489 fn(value_field_);
490 }
491
492 void hash_unique(UniqueHashBytes &hash, fn::FieldHashDeep &deep_hash_cache) const override
493 {
494 static constexpr int8_t id = 0;
495 hash.add(&id);
496 hash.add(deep_hash_cache.ensure(weight_field_));
497 hash.add(deep_hash_cache.ensure(value_field_));
498 hash.add(iterations_);
499 }
500
501 std::optional<AttrDomain> preferred_domain(const GeometryComponent &component) const override
502 {
503 return bke::try_detect_field_domain(component, value_field_);
504 }
505};
506
508{
509 const int iterations = params.extract_input<int>("Iterations"_ustr);
510 Field<float> weight_field = params.extract_input<Field<float>>("Weight"_ustr);
511
512 GField value_field = params.extract_input<GField>("Value"_ustr);
513 params.set_output<GField>("Value"_ustr,
515 std::move(weight_field), std::move(value_field), iterations));
516}
517
518static void node_rna(StructRNA *srna)
519{
521 srna,
522 "data_type",
523 "Data Type",
524 "",
528 [](bContext * /*C*/, PointerRNA * /*ptr*/, PropertyRNA * /*prop*/, bool *r_free) {
529 *r_free = true;
532 });
533 });
534}
535
536static void node_register()
537{
538 static bke::bNodeType ntype;
539 geo_node_type_base(&ntype, "GeometryNodeBlurAttribute"_ustr, GEO_NODE_BLUR_ATTRIBUTE);
540 ntype.ui_name = "Blur Attribute";
541 ntype.ui_description = "Mix attribute values of neighboring elements";
542 ntype.enum_name_legacy = "BLUR_ATTRIBUTE";
544 ntype.initfunc = node_init;
545 ntype.declare = node_declare;
550
551 node_rna(ntype.rna_ext.srna);
552}
553NOD_REGISTER_NODE(node_register)
554
555} // namespace blender::nodes::node_geo_blur_attribute_cc
Low-level operations for curves.
#define NODE_CLASS_ATTRIBUTE
Definition BKE_node.hh:493
#define GEO_NODE_BLUR_ATTRIBUTE
#define final(a, b, c)
Definition BLI_hash_c.hh:21
#define IFACE_(msgid)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
#define UI_ITEM_NONE
#define BLI_assert_unreachable()
#define ELEM(...)
MutableSpan< T > as_mutable_span()
Definition BLI_array.hh:259
void to_static_type(Fn &&fn) const
GMutableSpan as_mutable_span()
GSpan as_span() const
const void * data() const
const CPPType & type() const
const void * data() const
static GVArray from_garray(GArray<> array)
constexpr IndexRange()=default
constexpr IndexRange index_range() const
Definition BLI_span.hh:676
constexpr int64_t size() const
Definition BLI_span.hh:256
constexpr IndexRange index_range() const
Definition BLI_span.hh:405
int add(GField field, GVArray *varray_ptr)
int add_with_destination(GField field, GVMutableArray dst)
const GVArray & get_evaluated(const int field_index) const
uint64_t hash() const
Definition field.cc:185
const CPPType * type_
Definition FN_field.hh:341
const CPPType & cpp_type() const
Definition FN_field.hh:559
static GField from_input(Args &&...args)
Definition FN_field.hh:482
const bke::bNodeType & node_type() const
void add_item(std::string socket_name, SocketLinkOperation::LinkSocketFn fn, int weight=0)
T extract_input(const UString identifier)
void set_output(const UString identifier, T &&value)
Vector< SocketDeclaration * > inputs
std::optional< AttrDomain > preferred_domain(const GeometryComponent &component) const override
BlurAttributeFieldInput(Field< float > weight_field, GField value_field, const int iterations)
void hash_unique(UniqueHashBytes &hash, fn::FieldHashDeep &deep_hash_cache) const override
void foreach_recursive_field(FunctionRef< void(const GField &)> fn) const override
GVArray get_varray_for_context(const bke::GeometryFieldContext &context, const IndexMask &) const final
#define T
typename DefaultMixerStruct< T >::type DefaultMixer
int edge_other_vert(const int2 edge, const int vert)
Definition BKE_mesh.hh:370
GroupedSpan< int > build_edge_to_face_map(OffsetIndices< int > faces, Span< int > corner_edges, int edges_num, Array< int > &r_offsets, Array< int > &r_indices)
GroupedSpan< int > build_vert_to_edge_map(Span< int2 > edges, int verts_num, Array< int > &r_offsets, Array< int > &r_indices)
std::optional< AttrDomain > try_detect_field_domain(const GeometryComponent &component, const fn::GField &field)
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
std::optional< eCustomDataType > socket_type_to_custom_data_type(eNodeSocketDatatype type)
Definition node.cc:5911
static void node_geo_exec(GeoNodeExecParams params)
static Span< T > blur_on_curve_exec(const bke::CurvesGeometry &curves, const Span< float > neighbor_weights, const int iterations, const MutableSpan< T > buffer_a, const MutableSpan< T > buffer_b)
static void build_corner_to_corner_by_vert_map(const GroupedSpan< int > vert_to_corner_map, const OffsetIndices< int > faces, const Span< int > corner_verts, const int corners_num, Array< int > &r_offsets, Array< int > &r_indices)
static void node_gather_link_searches(GatherLinkSearchOpParams &params)
static void build_vert_to_vert_by_edge_map(const Span< int2 > edges, const int verts_num, Array< int > &r_offsets, Array< int > &r_indices)
static void to_static_type_for_blur(const CPPType &type, const Func &func)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
static GSpan blur_on_mesh(const Mesh &mesh, const AttrDomain domain, const int iterations, const Span< float > neighbor_weights, const GMutableSpan buffer_a, const GMutableSpan buffer_b)
static GSpan blur_on_curves(const bke::CurvesGeometry &curves, const int iterations, const Span< float > neighbor_weights, const GMutableSpan buffer_a, const GMutableSpan buffer_b)
static GroupedSpan< int > create_mesh_map(const Mesh &mesh, const AttrDomain domain, Array< int > &r_offsets, Array< int > &r_indices)
static void build_face_to_face_by_edge_map(const OffsetIndices< int > faces, const Span< int > corner_edges, const int edges_num, Array< int > &r_offsets, Array< int > &r_indices)
static void build_edge_to_edge_by_vert_map(const Span< int2 > edges, const int verts_num, Array< int > &r_offsets, Array< int > &r_indices)
static void node_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static Span< T > blur_on_mesh_exec(const Span< float > neighbor_weights, const GroupedSpan< int > neighbors_map, const int iterations, const MutableSpan< T > buffer_a, const MutableSpan< T > buffer_b)
void search_link_ops_for_declarations(GatherLinkSearchOpParams &params, Span< SocketDeclaration * > declarations)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
const EnumPropertyItem * enum_items_filter(const EnumPropertyItem *original_item_array, FunctionRef< bool(const EnumPropertyItem &item)> fn)
OffsetIndices< int > accumulate_counts_to_offsets(MutableSpan< int > counts_to_offsets, int start_offset=0)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
Definition BLI_task.hh:69
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
__int64 int64_t
Definition BKE_text.h:90
const EnumPropertyItem rna_enum_attribute_type_items[]
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
VecBase< float, 3 > float3
@ PROP_FACTOR
Definition RNA_types.hh:308
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
signed char int8_t
Definition BKE_text.h:76
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eNodeSocketDatatype type
Defines a node type.
Definition BKE_node.hh:265
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
Definition BKE_node.hh:290
std::string ui_description
Definition BKE_node.hh:271
NodeGeometryExecFunction geometry_node_execute
Definition BKE_node.hh:385
void(*) initfunc(bNodeTree *ntree, bNode *node)
Definition BKE_node.hh:320
const char * enum_name_legacy
Definition BKE_node.hh:274
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition BKE_node.hh:409
NodeDeclareFunction declare
Definition BKE_node.hh:393
nodes::NodeDeclaration * static_declaration
Definition BKE_node.hh:402
UniqueHash ensure(const GFieldRef &field)
Definition field.cc:113
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)