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