Blender V5.3
node_geo_string_to_curves.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 "DNA_curve_types.h"
6
7#include "BKE_curve.hh"
9#include "BKE_curves.hh"
10#include "BKE_instances.hh"
11#include "BKE_vfont.hh"
12
13#include "DNA_vfont_types.h"
14
15#include "BLI_bounds.hh"
16#include "BLI_math_matrix.hh"
17#include "BLI_string_utf8.hh"
18#include "BLI_task.hh"
19
20#include "BLT_translation.hh"
21
22#include "MEM_guardedalloc.h"
23#include "UI_interface.hh"
25#include "UI_resources.hh"
26
27#include "GEO_randomize.hh"
28
29#include "node_geometry_util.hh"
30
32
34
37 "OVERFLOW",
38 ICON_NONE,
39 N_("Overflow"),
40 N_("Let the text use more space than the specified height")},
42 "SCALE_TO_FIT",
43 ICON_NONE,
44 N_("Scale To Fit"),
45 N_("Scale the text size to fit inside the width and height")},
47 "TRUNCATE",
48 ICON_NONE,
49 N_("Truncate"),
50 N_("Only output curves that fit within the width and height. Output the remainder to the "
51 "\"Remainder\" output.")},
52 {0, nullptr, 0, nullptr, nullptr},
53};
54
57 "LEFT",
58 ICON_ALIGN_LEFT,
59 N_("Left"),
60 N_("Align text to the left")},
62 "CENTER",
63 ICON_ALIGN_CENTER,
64 N_("Center"),
65 N_("Align text to the center")},
67 "RIGHT",
68 ICON_ALIGN_RIGHT,
69 N_("Right"),
70 N_("Align text to the right")},
72 "JUSTIFY",
73 ICON_ALIGN_JUSTIFY,
74 N_("Justify"),
75 N_("Align text to the left and the right")},
77 "FLUSH",
78 ICON_ALIGN_FLUSH,
79 N_("Flush"),
80 N_("Align text to the left and the right, with equal character spacing")},
81 {0, nullptr, 0, nullptr, nullptr},
82};
83
86 "TOP",
87 ICON_ALIGN_TOP,
88 N_("Top"),
89 N_("Align text to the top")},
91 "TOP_BASELINE",
92 ICON_ALIGN_TOP,
93 N_("Top Baseline"),
94 N_("Align text to the top line's baseline")},
96 "MIDDLE",
97 ICON_ALIGN_MIDDLE,
98 N_("Middle"),
99 N_("Align text to the middle")},
101 "BOTTOM_BASELINE",
102 ICON_ALIGN_BOTTOM,
103 N_("Bottom Baseline"),
104 N_("Align text to the bottom line's baseline")},
106 "BOTTOM",
107 ICON_ALIGN_BOTTOM,
108 N_("Bottom"),
109 N_("Align text to the bottom")},
110 {0, nullptr, 0, nullptr, nullptr},
111};
112
115 "MIDPOINT",
116 0,
117 N_("Midpoint"),
118 N_("Set the pivot point for each character at its midpoint")},
120 "TOP_LEFT",
121 0,
122 N_("Top Left"),
123 N_("Set the pivot point for each character at its top left")},
125 "TOP_CENTER",
126 0,
127 N_("Top Center"),
128 N_("Set the pivot point for each character at its top center")},
130 "TOP_RIGHT",
131 0,
132 N_("Top Right"),
133 N_("Set the pivot point for each character at its top right")},
135 "BOTTOM_LEFT",
136 0,
137 N_("Bottom Left"),
138 N_("Set the pivot point for each character at its bottom left")},
140 "BOTTOM_CENTER",
141 0,
142 N_("Bottom Center"),
143 N_("Set the pivot point for each character at its bottom center")},
145 "BOTTOM_RIGHT",
146 0,
147 N_("Bottom Right"),
148 N_("Set the pivot point for each character at its bottom right")},
149 {0, nullptr, 0, nullptr, nullptr},
150};
151
153{
154 b.use_custom_socket_order();
155 b.allow_any_socket_order();
156
157 b.add_output<decl::Geometry>("Curve Instances"_ustr);
158 b.add_output<decl::String>("Remainder"_ustr)
159 .usage_by_menu("Overflow"_ustr, GEO_NODE_STRING_TO_CURVES_MODE_TRUNCATE);
160 b.add_output<decl::Int>("Line"_ustr)
161 .anonymous_attribute_output()
163 b.add_output<decl::Int>("Word"_ustr)
164 .anonymous_attribute_output()
166 b.add_output<decl::Vector>("Pivot Point"_ustr).anonymous_attribute_output();
167
168 b.add_input<decl::String>("String"_ustr).optional_label();
169 b.add_input<decl::Float>("Size"_ustr).default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE);
170 b.add_input<decl::Font>("Font"_ustr)
171 .default_value_fn(
172 [](const bNode & /*node*/) { return id_cast<ID *>(BKE_vfont_builtin_ensure()); })
173 .optional_label();
174 {
175 auto &p = b.add_panel("Alignment"_ustr).default_closed(true);
176 p.add_input<decl::Menu>("Align X"_ustr)
179 p.add_input<decl::Menu>("Align Y"_ustr)
182 p.add_input<decl::Menu>("Pivot Point"_ustr)
184 .description("Point around which to rotate each character instance");
185 }
186 {
187 auto &p = b.add_panel("Spacing"_ustr).default_closed(true);
188 p.add_input<decl::Float>("Character Spacing"_ustr).default_value(1.0f).min(0.0f);
189 p.add_input<decl::Float>("Word Spacing"_ustr).default_value(1.0f).min(0.0f);
190 p.add_input<decl::Float>("Line Spacing"_ustr).default_value(1.0f).min(0.0f);
191 }
192 {
193 auto &p = b.add_panel("Text Box"_ustr).default_closed(true);
194 p.add_input<decl::Menu>("Overflow"_ustr)
197 p.add_input<decl::Float>("Text Box Width"_ustr)
198 .default_value(0.0f)
199 .min(0.0f)
201 p.add_input<decl::Float>("Text Box Height"_ustr)
202 .default_value(0.0f)
203 .min(0.0f)
205 .usage_by_menu("Overflow"_ustr,
208 }
209}
210
211static void node_init(bNodeTree * /*tree*/, bNode *node)
212{
213 /* Still used for forward compatibility. */
214 NodeGeometryStringToCurves *data = MEM_new<NodeGeometryStringToCurves>(__func__);
215 node->storage = data;
216}
217
219{
220 const GeometryNodeStringToCurvesPivotMode pivot_mode =
221 params.get_input<GeometryNodeStringToCurvesPivotMode>("Pivot Point"_ustr);
222
223 const std::optional<Bounds<float3>> bounds = bounds::min_max(curves.positions());
224
225 /* Check if curve is empty. */
226 if (!bounds.has_value()) {
227 return {0.0f, 0.0f, 0.0f};
228 }
229 const float3 min = bounds->min;
230 const float3 max = bounds->max;
231
232 switch (pivot_mode) {
234 return (min + max) / 2;
236 return float3(min.x, min.y, 0.0f);
238 return float3((min.x + max.x) / 2, min.y, 0.0f);
240 return float3(max.x, min.y, 0.0f);
242 return float3(min.x, max.y, 0.0f);
244 return float3((min.x + max.x) / 2, max.y, 0.0f);
246 return float3(max.x, max.y, 0.0f);
247 }
248 return {0.0f, 0.0f, 0.0f};
249}
250
252 /* Position of each character. */
254
255 /* Line number of each character. */
257
258 /* Word number of each character. */
260
261 /* Map of Pivot point for each character code. */
263
264 /* UTF32 Character codes. */
266
267 /* The text that fit into the text box, with newline character sequences replaced. */
268 std::string text;
269
270 /* The text that didn't fit into the text box in "Truncate" mode. May be empty. */
271 std::string truncated_text;
272
273 /* Font size could be modified if in "Scale to fit"-mode. */
275};
276
277static std::optional<TextLayout> get_text_layout(GeoNodeExecParams &params)
278{
279 VFont *vfont = params.get_input<VFont *>("Font"_ustr);
280 if (!vfont) {
281 params.error_message_add(NodeWarningType::Error, TIP_("Font not specified"));
282 return std::nullopt;
283 }
284
285 TextLayout layout;
286 layout.text = params.extract_input<std::string>("String"_ustr);
287 if (layout.text.empty()) {
288 return std::nullopt;
289 }
290
291 const auto overflow = params.get_input<GeometryNodeStringToCurvesOverflowMode>("Overflow"_ustr);
292 const auto align_x = params.get_input<GeometryNodeStringToCurvesAlignXMode>("Align X"_ustr);
293 const auto align_y = params.get_input<GeometryNodeStringToCurvesAlignYMode>("Align Y"_ustr);
294
295 const float font_size = std::max(params.extract_input<float>("Size"_ustr), 0.0f);
296 const float char_spacing = params.extract_input<float>("Character Spacing"_ustr);
297 const float word_spacing = params.extract_input<float>("Word Spacing"_ustr);
298 const float line_spacing = params.extract_input<float>("Line Spacing"_ustr);
299 const float textbox_w = params.extract_input<float>("Text Box Width"_ustr);
300 const float textbox_h = overflow == GEO_NODE_STRING_TO_CURVES_MODE_OVERFLOW ?
301 0.0f :
302 params.extract_input<float>("Text Box Height"_ustr);
303
305 cu.ob_type = OB_FONT;
306 /* Set defaults */
307 cu.resolu = 12;
308 cu.smallcaps_scale = 0.75f;
309 cu.wordspace = 1.0f;
310 /* Set values from inputs */
311 cu.spacemode = eCurveSpaceMode(align_x);
312 cu.align_y = eCurveAlignY(align_y);
313 cu.fsize = font_size;
314 cu.spacing = char_spacing;
315 cu.wordspace = word_spacing;
316 cu.linedist = line_spacing;
317 cu.vfont = vfont;
318 cu.overflow = eCurveOverflow(overflow);
319 cu.tb = MEM_new_array<TextBox>(MAXTEXTBOX, __func__);
320 cu.tb->w = textbox_w;
321 cu.tb->h = textbox_h;
322 cu.totbox = 1;
323 size_t len_bytes;
324 size_t len_chars = BLI_strlen_utf8_ex(layout.text.c_str(), &len_bytes);
325 cu.len_char32 = len_chars;
326 cu.len = len_bytes;
327 cu.pos = len_chars;
328 /* The reason for the additional character here is unknown, but reflects other code elsewhere. */
329 cu.str = MEM_new_array_uninitialized<char>(len_bytes + sizeof(char32_t), __func__);
330 memcpy(cu.str, layout.text.c_str(), len_bytes + 1);
331 cu.strinfo = MEM_new_array<CharInfo>(len_chars + 1, __func__);
332
333 CharTrans *chartransdata = nullptr;
334 int text_len;
335 bool text_free;
336 const char32_t *r_text = nullptr;
337 float final_font_size = 0.0f;
338 /* Mode FO_DUPLI used because it doesn't create curve splines. */
339 BKE_vfont_to_curve_ex(nullptr,
340 cu,
341 FO_DUPLI,
342 nullptr,
343 &r_text,
344 &text_len,
345 &text_free,
346 &chartransdata,
347 &final_font_size);
348
349 if (text_free) {
350 MEM_delete(r_text);
351 }
352
353 Span<CharInfo> info{cu.strinfo, text_len};
354 layout.final_font_size = final_font_size;
355 layout.positions.reserve(text_len);
356
357 for (const int i : IndexRange(text_len)) {
358 CharTrans &ct = chartransdata[i];
359 layout.positions.append(ct.offset * layout.final_font_size);
360
361 if (ct.is_overflow && (cu.overflow == CU_OVERFLOW_TRUNCATE)) {
362 const int offset = BLI_str_utf8_offset_from_index(
363 layout.text.c_str(), layout.text.size(), i + 1);
364 layout.truncated_text = layout.text.substr(offset);
365 layout.text = layout.text.substr(0, offset);
366 break;
367 }
368 }
369
370 if (params.anonymous_attribute_output_is_required("Line"_ustr)) {
371 layout.line_numbers.reinitialize(layout.positions.size());
372 for (const int i : layout.positions.index_range()) {
373 CharTrans &ct = chartransdata[i];
374 layout.line_numbers[i] = ct.linenr;
375 }
376 }
377
378 if (params.anonymous_attribute_output_is_required("Word"_ustr)) {
379 layout.word_numbers.reinitialize(layout.positions.size());
380 for (const int i : layout.positions.index_range()) {
381 CharTrans &ct = chartransdata[i];
382 layout.word_numbers[i] = ct.wordnr;
383 }
384 }
385
386 /* Convert UTF8 encoded string to UTF32. */
387 len_chars = BLI_strlen_utf8_ex(layout.text.c_str(), &len_bytes);
388 layout.char_codes.resize(len_chars + 1);
389 BLI_str_utf8_as_utf32(layout.char_codes.data(), layout.text.c_str(), layout.char_codes.size());
390 layout.char_codes.remove_last();
391
392 MEM_SAFE_DELETE(chartransdata);
393 MEM_SAFE_DELETE(cu.str);
394 MEM_SAFE_DELETE(cu.strinfo);
395 MEM_SAFE_DELETE(cu.tb);
396
397 return layout;
398}
399
402 TextLayout &layout,
403 bke::Instances &instances)
404{
405 VFont *vfont = params.get_input<VFont *>("Font"_ustr);
406 Map<int, int> handles;
407 bool pivot_required = params.anonymous_attribute_output_is_required("Pivot Point"_ustr);
408
409 for (int i : layout.char_codes.index_range()) {
410 if (handles.contains(layout.char_codes[i])) {
411 continue;
412 }
414 cu.ob_type = OB_FONT;
415 cu.resolu = 12;
416 cu.vfont = vfont;
417 CharInfo charinfo = {0};
418 charinfo.mat_nr = 1;
419
420 const float2 char_offset = {0, 0};
422 cu, &cu.nurb, layout.char_codes[i], &charinfo, false, char_offset, 0, i, 1);
423 Curves *curves_id = bke::curve_legacy_to_curves(cu);
424 if (curves_id == nullptr) {
425 if (pivot_required) {
426 layout.pivot_points.add_new(layout.char_codes[i], float3(0));
427 }
428 handles.add_new(layout.char_codes[i], instances.add_reference({}));
429 continue;
430 }
431
432 bke::CurvesGeometry &curves = curves_id->geometry.wrap();
434
436
438 curves.transform(size_matrix);
439
440 if (pivot_required) {
441 float3 pivot_point = get_pivot_point(params, curves);
442 layout.pivot_points.add_new(layout.char_codes[i], pivot_point);
443 }
444
445 GeometrySet geometry_set = GeometrySet::from_curves(curves_id);
446
447 {
448 const char32_t char_code[2] = {layout.char_codes[i], 0};
449 char inserted_utf8[8] = {0};
450 const size_t len = BLI_str_utf32_as_utf8(inserted_utf8, char_code, sizeof(inserted_utf8));
451 geometry_set.set_name(std::string(inserted_utf8, len));
452 }
453
454 handles.add_new(layout.char_codes[i], instances.add_reference(std::move(geometry_set)));
455 }
456 return handles;
457}
458
460 const Map<int, int> &char_handles,
461 const TextLayout &layout)
462{
463 instances.resize(layout.positions.size());
464 MutableSpan<int> handles = instances.reference_handles_for_write();
465 MutableSpan<float4x4> transforms = instances.transforms_for_write();
466
467 threading::parallel_for(IndexRange(layout.positions.size()), 256, [&](IndexRange range) {
468 for (const int i : range) {
469 handles[i] = char_handles.lookup(layout.char_codes[i]);
470 transforms[i] = math::from_location<float4x4>(
471 {layout.positions[i].x, layout.positions[i].y, 0});
472 }
473 });
474}
475
477 const TextLayout &layout,
478 bke::Instances &instances)
479{
480 MutableAttributeAccessor attributes = instances.attributes_for_write();
481
482 if (std::optional<std::string> line_id = params.get_output_anonymous_attribute_id_if_needed(
483 "Line"_ustr))
484 {
485 SpanAttributeWriter<int> line_attribute = attributes.lookup_or_add_for_write_only_span<int>(
486 *line_id, AttrDomain::Instance);
487 line_attribute.span.copy_from(layout.line_numbers);
488 line_attribute.finish();
489 }
490 if (std::optional<std::string> line_id = params.get_output_anonymous_attribute_id_if_needed(
491 "Word"_ustr))
492 {
493 SpanAttributeWriter<int> word_attribute = attributes.lookup_or_add_for_write_only_span<int>(
494 *line_id, AttrDomain::Instance);
495 word_attribute.span.copy_from(layout.word_numbers);
496 word_attribute.finish();
497 }
498
499 if (std::optional<std::string> pivot_id = params.get_output_anonymous_attribute_id_if_needed(
500 "Pivot Point"_ustr))
501 {
502 SpanAttributeWriter<float3> pivot_attribute =
503 attributes.lookup_or_add_for_write_only_span<float3>(*pivot_id, AttrDomain::Instance);
504
505 for (const int i : layout.char_codes.index_range()) {
506 pivot_attribute.span[i] = layout.pivot_points.lookup(layout.char_codes[i]);
507 }
508
509 pivot_attribute.finish();
510 }
511}
512
514{
515 std::optional<TextLayout> layout = get_text_layout(params);
516 if (!layout) {
518 return;
519 }
520
521 const auto overflow = params.get_input<GeometryNodeStringToCurvesOverflowMode>("Overflow"_ustr);
523 params.set_output("Remainder"_ustr, std::move(layout->truncated_text));
524 }
525
526 if (layout->positions.is_empty()) {
527 params.set_output("Curve Instances"_ustr, GeometrySet());
529 return;
530 }
531
532 /* Create and add instances. */
533 auto instances = std::make_unique<bke::Instances>();
534 Map<int, int> char_handles = create_curve_instances(params, *layout, *instances);
535 add_instances_from_handles(*instances, char_handles, *layout);
536 create_attributes(params, *layout, *instances);
537
538 params.set_output("Curve Instances"_ustr, GeometrySet::from_instances(std::move(instances)));
539}
540
541static void node_register()
542{
543 static bke::bNodeType ntype;
544
545 geo_node_type_base(&ntype, "GeometryNodeStringToCurves"_ustr, GEO_NODE_STRING_TO_CURVES);
546 ntype.ui_name = "String to Curves";
547 ntype.ui_description =
548 "Generate a paragraph of text with a specific font, using a curve instance to store each "
549 "character";
550 ntype.enum_name_legacy = "STRING_TO_CURVES";
552 ntype.declare = node_declare;
554 ntype.initfunc = node_init;
557 ntype, "NodeGeometryStringToCurves", node_free_standard_storage, node_copy_standard_storage);
559}
560NOD_REGISTER_NODE(node_register)
561
562} // namespace blender::nodes::node_geo_string_to_curves_cc
Low-level operations for curves.
#define NODE_STORAGE_FUNCS(StorageT)
Definition BKE_node.hh:1353
#define NODE_CLASS_GEOMETRY
Definition BKE_node.hh:492
#define GEO_NODE_STRING_TO_CURVES
#define BLT_I18NCONTEXT_ID_TEXT
#define TIP_(msgid)
#define MAXTEXTBOX
Read Blender memory allocation and freeing.
#define NOD_REGISTER_NODE(REGISTER_FUNC)
btScalar max
void reinitialize(const int64_t new_size)
Definition BLI_array.hh:430
constexpr IndexRange()=default
MutableSpan< int > reference_handles_for_write()
Definition instances.cc:229
int add_reference(const InstanceReference &reference)
Definition instances.cc:268
bke::MutableAttributeAccessor attributes_for_write()
Definition instances.cc:73
void resize(int size)
Definition instances.cc:216
MutableSpan< float4x4 > transforms_for_write()
Definition instances.cc:242
GSpanAttributeWriter lookup_or_add_for_write_only_span(StringRef name, AttrDomain domain, AttrType data_type)
void error_message_add(const NodeWarningType type, StringRef message) const
std::optional< std::string > get_output_anonymous_attribute_id_if_needed(const UString output_identifier, const bool force_create=false)
T extract_input(const UString identifier)
T get_input(const UString identifier) const
bool anonymous_attribute_output_is_required(const UString output_identifier)
void set_output(const UString identifier, T &&value)
std::optional< std::string > translation_context
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263
Curves * curve_legacy_to_curves(const Curve &curve_legacy)
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
Definition node.cc:6166
std::optional< Bounds< T > > min_max(const std::optional< Bounds< T > > &a, const T &b)
Definition BLI_bounds.hh:56
internal::ShallowZeroInitializeTag shallow_zero_initialize()
Definition DNA_defs.h:159
void debug_randomize_curve_order(bke::CurvesGeometry *curves)
Definition randomize.cc:274
MatT from_scale(const VecBase< typename MatT::base_type, ScaleDim > &scale)
static Map< int, int > create_curve_instances(GeoNodeExecParams &params, TextLayout &layout, bke::Instances &instances)
static void add_instances_from_handles(bke::Instances &instances, const Map< int, int > &char_handles, const TextLayout &layout)
static const EnumPropertyItem rna_node_geometry_string_to_curves_align_y_items[]
static void create_attributes(GeoNodeExecParams &params, const TextLayout &layout, bke::Instances &instances)
static void node_init(bNodeTree *, bNode *node)
static float3 get_pivot_point(GeoNodeExecParams &params, bke::CurvesGeometry &curves)
static const EnumPropertyItem rna_node_geometry_string_to_curves_overflow_items[]
static const EnumPropertyItem rna_node_geometry_string_to_curves_align_x_items[]
static const EnumPropertyItem rna_node_geometry_string_to_curves_pivot_mode[]
static std::optional< TextLayout > get_text_layout(GeoNodeExecParams &params)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
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
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void BKE_nurbList_free(ListBaseT< Nurb > *lb)
Definition curve.cc:619
GeometryNodeStringToCurvesAlignYMode
@ GEO_NODE_STRING_TO_CURVES_ALIGN_Y_BOTTOM_BASELINE
@ GEO_NODE_STRING_TO_CURVES_ALIGN_Y_TOP
@ GEO_NODE_STRING_TO_CURVES_ALIGN_Y_TOP_BASELINE
@ GEO_NODE_STRING_TO_CURVES_ALIGN_Y_BOTTOM
@ GEO_NODE_STRING_TO_CURVES_ALIGN_Y_MIDDLE
size_t BLI_str_utf8_as_utf32(char32_t *__restrict dst_w, const char *__restrict src_c, size_t dst_w_maxncpy) ATTR_NONNULL(1
void BKE_vfont_char_build(const Curve &cu, ListBaseT< Nurb > *nubase, unsigned int charcode, const CharInfo *info, bool is_smallcaps, const float2 &offset, float rotate, int charidx, float fsize)
MatBase< float, 4, 4 > float4x4
bool BKE_vfont_to_curve_ex(Object *ob, const Curve &cu, eEditFontMode mode, ListBaseT< Nurb > *r_nubase, const char32_t **r_text, int *r_text_len, bool *r_text_free, CharTrans **r_chartransdata, float *r_font_size_eval)
size_t size_t BLI_str_utf32_as_utf8(char *__restrict dst, const char32_t *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
VecBase< float, 2 > float2
BMesh const char void * data
int BLI_str_utf8_offset_from_index(const char *str, size_t str_len, int index_target) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
GeometryNodeStringToCurvesAlignXMode
@ GEO_NODE_STRING_TO_CURVES_ALIGN_X_FLUSH
@ GEO_NODE_STRING_TO_CURVES_ALIGN_X_CENTER
@ GEO_NODE_STRING_TO_CURVES_ALIGN_X_JUSTIFY
@ GEO_NODE_STRING_TO_CURVES_ALIGN_X_RIGHT
@ GEO_NODE_STRING_TO_CURVES_ALIGN_X_LEFT
VFont * BKE_vfont_builtin_ensure()
Definition vfont.cc:387
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
Definition node_util.cc:57
void node_free_standard_storage(bNode *node)
Definition node_util.cc:45
size_t BLI_strlen_utf8_ex(const char *strc, size_t *r_len_bytes) ATTR_NONNULL(1
VecBase< float, 3 > float3
@ PROP_DISTANCE
Definition RNA_types.hh:313
GeometryNodeStringToCurvesOverflowMode
@ GEO_NODE_STRING_TO_CURVES_MODE_TRUNCATE
@ GEO_NODE_STRING_TO_CURVES_MODE_OVERFLOW
@ GEO_NODE_STRING_TO_CURVES_MODE_SCALE_TO_FIT
GeometryNodeStringToCurvesPivotMode
@ GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_BOTTOM_RIGHT
@ GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_MIDPOINT
@ GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_BOTTOM_CENTER
@ GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_TOP_CENTER
@ GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_BOTTOM_LEFT
@ GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_TOP_LEFT
@ GEO_NODE_STRING_TO_CURVES_PIVOT_MODE_TOP_RIGHT
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
#define min(a, b)
Definition sort.cc:38
struct VFont * vfont
ListBaseT< Nurb > nurb
void set_name(std::string name)
static constexpr int _200
Definition BKE_node.hh:248
Defines a node type.
Definition BKE_node.hh:265
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
NodeDeclareFunction declare
Definition BKE_node.hh:393
static GeometrySet from_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
static GeometrySet from_instances(std::unique_ptr< Instances > instances)
#define N_(msgid)