Blender V5.3
rna_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
8
9#include <cstdlib>
10
11#include "RNA_define.hh"
12#include "RNA_enum_types.hh"
13
14#include "rna_internal.hh"
15
16#include "DNA_curves_types.h"
17
18#include "BKE_attribute.h"
19
20#include "BLT_translation.hh"
21
22#include "WM_types.hh"
23
24namespace blender {
25
27 {CURVE_TYPE_CATMULL_ROM, "CATMULL_ROM", 0, "Catmull Rom", ""},
28 {CURVE_TYPE_POLY, "POLY", 0, "Poly", ""},
29 {CURVE_TYPE_BEZIER, "BEZIER", 0, "Bézier", ""},
30 {CURVE_TYPE_NURBS, "NURBS", 0, "NURBS", ""},
31 {0, nullptr, 0, nullptr, nullptr},
32};
33
36 "FREE",
37 0,
38 "Free",
39 "The handle can be moved anywhere, and does not influence the point's other handle"},
41 "AUTO",
42 0,
43 "Auto",
44 "The location is automatically calculated to be smooth"},
46 "VECTOR",
47 0,
48 "Vector",
49 "The location is calculated to point to the next/previous control point"},
51 "ALIGN",
52 0,
53 "Align",
54 "The location is constrained to point in the opposite direction as the other handle"},
55 {0, nullptr, 0, nullptr, nullptr},
56};
57
60 "MINIMUM_TWIST",
61 ICON_NONE,
62 N_("Minimum Twist"),
63 N_("Calculate normals with the smallest twist around the curve tangent across the whole "
64 "curve")},
66 "Z_UP",
67 ICON_NONE,
68 N_("Z Up"),
69 N_("Calculate normals perpendicular to the Z axis and the curve tangent. If a series of "
70 "points is vertical, the X axis is used.")},
72 "FREE",
73 ICON_NONE,
74 N_("Free"),
75 N_("Use the stored custom normal attribute as the final normals")},
76 {0, nullptr, 0, nullptr, nullptr},
77};
78
79} // namespace blender
80
81#ifdef RNA_RUNTIME
82
83# include <fmt/format.h>
84
85# include "BLI_math_vector_c.hh"
86# include "BLI_offset_indices.hh"
87
88# include "BKE_attribute.hh"
89# include "BKE_curves.hh"
90# include "BKE_report.hh"
91
92# include "DEG_depsgraph.hh"
93
94# include "ED_curves.hh"
95
96# include "WM_api.hh"
97# include "WM_types.hh"
98
99namespace blender {
100
101static Curves *rna_curves(const PointerRNA *ptr)
102{
103 return reinterpret_cast<Curves *>(ptr->owner_id);
104}
105
106static int rna_Curves_curve_offset_data_length(PointerRNA *ptr)
107{
108 const Curves *curves = rna_curves(ptr);
109 return curves->geometry.curve_num + 1;
110}
111
112static void rna_Curves_curve_offset_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
113{
114 Curves *curves = rna_curves(ptr);
116 ptr,
117 curves->geometry.wrap().offsets_for_write().data(),
118 sizeof(int),
119 curves->geometry.curve_num + 1,
120 false,
121 nullptr);
122}
123
124static bool rna_Curves_curve_offset_data_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
125{
126 Curves *curves = rna_curves(ptr);
127 if (index < 0 || index >= curves->geometry.curve_num + 1) {
128 return false;
129 }
131 *ptr, RNA_IntAttributeValue, &curves->geometry.wrap().offsets_for_write()[index], *r_ptr);
132 return true;
133}
134
136{
137 return reinterpret_cast<float (*)[3]>(curves.geometry.wrap().positions_for_write().data());
138}
139
140static const float (*get_curves_positions(const Curves &curves))[3]
141{
142 return reinterpret_cast<const float (*)[3]>(curves.geometry.wrap().positions().data());
143}
144
145static int rna_CurvePoint_index_get_const(const PointerRNA *ptr)
146{
147 const Curves *curves = rna_curves(ptr);
148 const float (*co)[3] = static_cast<float (*)[3]>(ptr->data);
149 const float (*positions)[3] = get_curves_positions(*curves);
150 return int(co - positions);
151}
152
153static void rna_Curves_curves_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
154{
155 Curves *curves = rna_curves(ptr);
157 ptr,
158 curves->geometry.wrap().offsets_for_write().data(),
159 sizeof(int),
160 curves->geometry.curve_num,
161 false,
162 nullptr);
163}
164
165static int rna_Curves_curves_length(PointerRNA *ptr)
166{
167 const Curves *curves = rna_curves(ptr);
168 return curves->geometry.curve_num;
169}
170
171static bool rna_Curves_curves_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
172{
173 Curves *curves = rna_curves(ptr);
174 if (index < 0 || index >= curves->geometry.curve_num) {
175 return false;
176 }
178 *ptr, RNA_CurveSlice, &curves->geometry.wrap().offsets_for_write()[index], *r_ptr);
179 return true;
180}
181
182static int rna_Curves_position_data_length(PointerRNA *ptr)
183{
184 const Curves *curves = rna_curves(ptr);
185 return curves->geometry.point_num;
186}
187
188bool rna_Curves_position_data_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
189{
190 Curves *curves = rna_curves(ptr);
191 if (index < 0 || index >= curves->geometry.point_num) {
192 return false;
193 }
195 RNA_FloatVectorAttributeValue,
197 *r_ptr);
198 return true;
199}
200
201static void rna_Curves_position_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
202{
203 Curves *curves = rna_curves(ptr);
205 ptr,
207 sizeof(float[3]),
208 curves->geometry.point_num,
209 false,
210 nullptr);
211}
212
213static int rna_CurvePoint_index_get(PointerRNA *ptr)
214{
215 return rna_CurvePoint_index_get_const(ptr);
216}
217
218static void rna_CurvePoint_location_get(PointerRNA *ptr, float value[3])
219{
220 copy_v3_v3(value, static_cast<const float *>(ptr->data));
221}
222
223static void rna_CurvePoint_location_set(PointerRNA *ptr, const float value[3])
224{
225 copy_v3_v3(static_cast<float *>(ptr->data), value);
226}
227
228static float rna_CurvePoint_radius_get(PointerRNA *ptr)
229{
230 const Curves *curves = rna_curves(ptr);
231 const bke::AttributeAccessor attributes = curves->geometry.wrap().attributes();
232 const VArray radii = *attributes.lookup_or_default<float>(
233 "radius", bke::AttrDomain::Point, 0.0f);
234 return radii[rna_CurvePoint_index_get_const(ptr)];
235}
236
237static void rna_CurvePoint_radius_set(PointerRNA *ptr, float value)
238{
239 Curves *curves = rna_curves(ptr);
240 bke::MutableAttributeAccessor attributes = curves->geometry.wrap().attributes_for_write();
241 bke::AttributeWriter radii = attributes.lookup_or_add_for_write<float>("radius",
243 if (!radii) {
244 return;
245 }
246 radii.varray.set(rna_CurvePoint_index_get_const(ptr), value);
247}
248
249static std::optional<std::string> rna_CurvePoint_path(const PointerRNA *ptr)
250{
251 return fmt::format("points[{}]", rna_CurvePoint_index_get_const(ptr));
252}
253
254bool rna_Curves_points_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
255{
256 Curves *curves = rna_curves(ptr);
257 if (index < 0 || index >= curves->geometry.point_num) {
258 return false;
259 }
261 *ptr, RNA_CurvePoint, &get_curves_positions_for_write(*curves)[index], *r_ptr);
262 return true;
263}
264
265static int rna_CurveSlice_index_get_const(const PointerRNA *ptr)
266{
267 Curves *curves = rna_curves(ptr);
268 return int(static_cast<int *>(ptr->data) - curves->geometry.curve_offsets);
269}
270
271static int rna_CurveSlice_index_get(PointerRNA *ptr)
272{
273 return rna_CurveSlice_index_get_const(ptr);
274}
275
276static std::optional<std::string> rna_CurveSlice_path(const PointerRNA *ptr)
277{
278 return fmt::format("curves[{}]", rna_CurveSlice_index_get_const(ptr));
279}
280
281static int rna_CurveSlice_first_point_index_get(PointerRNA *ptr)
282{
283 const int *offset_ptr = static_cast<int *>(ptr->data);
284 return *offset_ptr;
285}
286
287static int rna_CurveSlice_points_length_get(PointerRNA *ptr)
288{
289 const int *offset_ptr = static_cast<int *>(ptr->data);
290 const int offset = *offset_ptr;
291 return *(offset_ptr + 1) - offset;
292}
293
294static void rna_CurveSlice_points_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
295{
296 Curves *curves = rna_curves(ptr);
297 const int offset = rna_CurveSlice_first_point_index_get(ptr);
298 const int size = rna_CurveSlice_points_length_get(ptr);
299 float (*positions)[3] = get_curves_positions_for_write(*curves);
300 float (*co)[3] = positions + offset;
301 rna_iterator_array_begin(iter, ptr, co, sizeof(float[3]), size, 0, nullptr);
302}
303
304static void rna_Curves_normals_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
305{
306 Curves *curves = rna_curves(ptr);
308 const int size = curves->geometry.point_num;
309 rna_iterator_array_begin(iter, ptr, positions, sizeof(float[3]), size, true, nullptr);
310}
311
312static void rna_Curves_update_data(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
313{
314 ID *id = ptr->owner_id;
315 /* Avoid updates for importers creating curves. */
316 if (id->us > 0) {
317 DEG_id_tag_update(id, 0);
319 }
320}
321
322void rna_Curves_update_draw(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
323{
324 ID *id = ptr->owner_id;
325 /* Avoid updates for importers creating curves. */
326 if (id->us > 0) {
328 }
329}
330
331} // namespace blender
332
333#else
334
335namespace blender {
336
338{
339 StructRNA *srna;
340 PropertyRNA *prop;
341
342 srna = RNA_def_struct(brna, "CurvePoint", nullptr);
343 RNA_def_struct_ui_text(srna, "Curve Point", "Curve control point");
344 RNA_def_struct_path_func(srna, "rna_CurvePoint_path");
345
346 prop = RNA_def_property(srna, "position", PROP_FLOAT, PROP_TRANSLATION);
347 RNA_def_property_array(prop, 3);
349 prop, "rna_CurvePoint_location_get", "rna_CurvePoint_location_set", nullptr);
350 RNA_def_property_ui_text(prop, "Position", "");
351 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
352
353 prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
355 prop, "rna_CurvePoint_radius_get", "rna_CurvePoint_radius_set", nullptr);
356 RNA_def_property_ui_text(prop, "Radius", "");
357 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
358
359 prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
361 RNA_def_property_int_funcs(prop, "rna_CurvePoint_index_get", nullptr, nullptr);
362 RNA_def_property_ui_text(prop, "Index", "Index of this point");
363}
364
365/* Defines a read-only vector type since normals can not be modified manually. */
367{
368 StructRNA *srna = RNA_def_struct(brna, "FloatVectorValueReadOnly", nullptr);
369 RNA_def_struct_sdna(srna, "vec3f");
370 RNA_def_struct_ui_text(srna, "Read-Only Vector", "");
371
372 PropertyRNA *prop = RNA_def_property(srna, "vector", PROP_FLOAT, PROP_DIRECTION);
373 RNA_def_property_ui_text(prop, "Vector", "3D vector");
374 RNA_def_property_float_sdna(prop, nullptr, "x");
375 RNA_def_property_array(prop, 3);
377}
378
380{
381 StructRNA *srna;
382 PropertyRNA *prop;
383
384 srna = RNA_def_struct(brna, "CurveSlice", nullptr);
385 RNA_def_struct_ui_text(srna, "Curve Slice", "A single curve from a curves data-block");
386 RNA_def_struct_path_func(srna, "rna_CurveSlice_path");
387
388 prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
389 RNA_def_property_struct_type(prop, "CurvePoint");
390 RNA_def_property_ui_text(prop, "Points", "Control points of the curve");
393 "rna_CurveSlice_points_begin",
394 "rna_iterator_array_next",
395 "rna_iterator_array_end",
396 "rna_iterator_array_get",
397 "rna_CurveSlice_points_length_get",
398 nullptr,
399 nullptr,
400 nullptr);
401
402 prop = RNA_def_property(srna, "first_point_index", PROP_INT, PROP_UNSIGNED);
404 RNA_def_property_int_funcs(prop, "rna_CurveSlice_first_point_index_get", nullptr, nullptr);
406 prop, "First Point Index", "The index of this curve's first control point");
407
408 prop = RNA_def_property(srna, "points_length", PROP_INT, PROP_UNSIGNED);
410 RNA_def_property_int_funcs(prop, "rna_CurveSlice_points_length_get", nullptr, nullptr);
411 RNA_def_property_ui_text(prop, "Number of Points", "Number of control points in the curve");
412
413 prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
415 RNA_def_property_int_funcs(prop, "rna_CurveSlice_index_get", nullptr, nullptr);
416 RNA_def_property_ui_text(prop, "Index", "Index of this curve");
417}
418
419static void rna_def_curves(BlenderRNA *brna)
420{
421 StructRNA *srna;
422 PropertyRNA *prop;
423
424 srna = RNA_def_struct(brna, "Curves", "ID");
425 RNA_def_struct_ui_text(srna, "Hair Curves", "Hair data-block for hair curves");
426 RNA_def_struct_ui_icon(srna, ICON_CURVES_DATA);
427
428 /* Point and Curve RNA API helpers. */
429
430 prop = RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
433 "rna_Curves_curves_begin",
434 "rna_iterator_array_next",
435 "rna_iterator_array_end",
436 "rna_iterator_array_get",
437 "rna_Curves_curves_length",
438 "rna_Curves_curves_lookup_int",
439 nullptr,
440 nullptr);
441 RNA_def_property_struct_type(prop, "CurveSlice");
442 RNA_def_property_ui_text(prop, "Curves", "All curves in the data-block");
443
444 prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
445 RNA_def_property_struct_type(prop, "CurvePoint");
448 "rna_Curves_position_data_begin",
449 "rna_iterator_array_next",
450 "rna_iterator_array_end",
451 "rna_iterator_array_get",
452 "rna_Curves_position_data_length",
453 "rna_Curves_points_lookup_int",
454 nullptr,
455 nullptr);
456 RNA_def_property_ui_text(prop, "Points", "Control points of all curves");
457
458 /* Direct access to built-in attributes. */
459
460 prop = RNA_def_property(srna, "position_data", PROP_COLLECTION, PROP_NONE);
463 "rna_Curves_position_data_begin",
464 "rna_iterator_array_next",
465 "rna_iterator_array_end",
466 "rna_iterator_array_get",
467 "rna_Curves_position_data_length",
468 "rna_Curves_position_data_lookup_int",
469 nullptr,
470 nullptr);
471 RNA_def_property_struct_type(prop, "FloatVectorAttributeValue");
472 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
473
474 prop = RNA_def_property(srna, "curve_offset_data", PROP_COLLECTION, PROP_NONE);
475 RNA_def_property_struct_type(prop, "IntAttributeValue");
478 "rna_Curves_curve_offset_data_begin",
479 "rna_iterator_array_next",
480 "rna_iterator_array_end",
481 "rna_iterator_array_get",
482 "rna_Curves_curve_offset_data_length",
483 "rna_Curves_curve_offset_data_lookup_int",
484 nullptr,
485 nullptr);
486 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
487
489
490 prop = RNA_def_property(srna, "normals", PROP_COLLECTION, PROP_NONE);
492 RNA_def_property_struct_type(prop, "FloatVectorValueReadOnly");
493 /* `lookup_int` isn't provided since the entire normals array is allocated and calculated when
494 * it's accessed. */
496 "rna_Curves_normals_begin",
497 "rna_iterator_array_next",
498 "rna_iterator_array_end",
499 "rna_iterator_array_get",
500 "rna_Curves_position_data_length",
501 nullptr,
502 nullptr,
503 nullptr);
505 prop, "Normals", "The curve normal value at each of the curve's control points");
506
507 /* materials */
508 prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
509 RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
510 RNA_def_property_struct_type(prop, "Material");
511 RNA_def_property_ui_text(prop, "Materials", "");
512 RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
514 nullptr,
515 nullptr,
516 nullptr,
517 nullptr,
518 nullptr,
519 nullptr,
520 nullptr,
521 "rna_IDMaterials_assign_int");
522
523 prop = RNA_def_property(srna, "surface", PROP_POINTER, PROP_NONE);
524 RNA_def_property_struct_type(prop, "Object");
527 RNA_def_property_pointer_funcs(prop, nullptr, nullptr, nullptr, "rna_Mesh_object_poll");
528 RNA_def_property_ui_text(prop, "Surface", "Mesh object that the curves can be attached to");
529 RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, nullptr);
530
531 prop = RNA_def_property(srna, "surface_uv_map", PROP_STRING, PROP_NONE);
532 RNA_def_property_string_sdna(prop, nullptr, "surface_uv_map");
534 "Surface UV Map",
535 "The name of the attribute on the surface mesh used to define the "
536 "attachment of each curve");
537 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
538
539 /* Symmetry. */
540 prop = RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
541 RNA_def_property_boolean_sdna(prop, nullptr, "symmetry", CURVES_SYMMETRY_X);
542 RNA_def_property_ui_text(prop, "X", "Enable symmetry in the X axis");
543 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
544
545 prop = RNA_def_property(srna, "use_mirror_y", PROP_BOOLEAN, PROP_NONE);
546 RNA_def_property_boolean_sdna(prop, nullptr, "symmetry", CURVES_SYMMETRY_Y);
547 RNA_def_property_ui_text(prop, "Y", "Enable symmetry in the Y axis");
548 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
549
550 prop = RNA_def_property(srna, "use_mirror_z", PROP_BOOLEAN, PROP_NONE);
551 RNA_def_property_boolean_sdna(prop, nullptr, "symmetry", CURVES_SYMMETRY_Z);
552 RNA_def_property_ui_text(prop, "Z", "Enable symmetry in the Z axis");
553 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
554
555 prop = RNA_def_property(srna, "selection_domain", PROP_ENUM, PROP_NONE);
557 RNA_def_property_ui_text(prop, "Selection Domain", "");
559 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
560
561 prop = RNA_def_property(srna, "use_sculpt_collision", PROP_BOOLEAN, PROP_NONE);
564 prop, "Use Sculpt Collision", "Enable collision with the surface while sculpting");
566 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
567
568 prop = RNA_def_property(srna, "surface_collision_distance", PROP_FLOAT, PROP_DISTANCE);
569 RNA_def_property_float_sdna(prop, nullptr, "surface_collision_distance");
571 RNA_def_property_ui_range(prop, 0.0, 10.0f, 0.001, 3);
573 prop, "Collision Distance", "Distance to keep the curves away from the surface");
574 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
575
576 /* attributes */
578
579 /* common */
581
582 RNA_api_curves(srna);
583}
584
586{
589 rna_def_curves(brna);
590}
591
592} // namespace blender
593
594#endif
Generic geometry attributes built on CustomData.
Low-level operations for curves.
#define NC_GEOM
Definition WM_types.hh:406
#define ND_DRAW
Definition WM_types.hh:502
#define ND_DATA
Definition WM_types.hh:552
#define NC_OBJECT
Definition WM_types.hh:392
#define FLT_MAX
#define FLT_EPSILON
int size(const AssetLibraryReference *library_reference)
Vector< Span< float3 > > get_curves_positions(const bke::CurvesGeometry &curves)
float(* point_normals_array_create(const Curves *curves_id))[3]
Vector< MutableSpan< float3 > > get_curves_positions_for_write(bke::CurvesGeometry &curves)
BMesh Iterators.
void WM_main_add_notifier(uint type, void *reference)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
const EnumPropertyItem rna_enum_attribute_curves_domain_items[]
const EnumPropertyItem rna_enum_curves_handle_type_items[]
Definition rna_curves.cc:34
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
static void rna_def_curves(BlenderRNA *brna)
const EnumPropertyItem rna_enum_curves_type_items[]
Definition rna_curves.cc:26
void rna_pointer_create_with_ancestors(const PointerRNA &parent, StructRNA *type, void *data, PointerRNA &r_ptr)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition RNA_types.hh:588
@ PROPOVERRIDE_IGNORE
Definition RNA_types.hh:609
void rna_def_animdata_common(StructRNA *srna)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
@ PROP_BOOLEAN
Definition RNA_types.hh:210
@ PROP_POINTER
Definition RNA_types.hh:215
@ PROP_STRING
Definition RNA_types.hh:213
@ PROP_COLLECTION
Definition RNA_types.hh:216
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void DEG_id_tag_update(ID *id, unsigned int flags)
BMesh const char void * data
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
static void rna_def_read_only_float_vector(BlenderRNA *brna)
void RNA_api_curves(StructRNA *srna)
void RNA_def_curves(BlenderRNA *brna)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
@ CV_SCULPT_COLLISION_ENABLED
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
@ CURVE_TYPE_CATMULL_ROM
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
@ PROP_EDITABLE
Definition RNA_types.hh:376
@ PROP_ANIMATABLE
Definition RNA_types.hh:389
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
static void rna_def_curves_point(BlenderRNA *brna)
@ NORMAL_MODE_MINIMUM_TWIST
@ PROP_TRANSLATION
Definition RNA_types.hh:318
@ PROP_DISTANCE
Definition RNA_types.hh:313
@ PROP_DIRECTION
Definition RNA_types.hh:319
@ PROP_UNSIGNED
Definition RNA_types.hh:306
const EnumPropertyItem rna_enum_curve_normal_mode_items[]
Definition rna_curves.cc:58
static void rna_def_curves_curve(BlenderRNA *brna)
void RNA_def_property_array(PropertyRNA *prop, int length)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, size_t itemsize, int64_t length, bool free_ptr, IteratorSkipFunc skip)
void rna_def_attributes_common(StructRNA *srna, const AttributeOwnerType type)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
#define N_(msgid)