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