Blender V4.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
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 handleW"},
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 curves->geometry.wrap().offsets_for_write().data(),
108 sizeof(int),
109 curves->geometry.curve_num + 1,
110 false,
111 nullptr);
112}
113
114static bool rna_Curves_curve_offset_data_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
115{
116 Curves *curves = rna_curves(ptr);
117 if (index < 0 || index >= curves->geometry.curve_num + 1) {
118 return false;
119 }
120 r_ptr->owner_id = &curves->id;
121 r_ptr->type = &RNA_IntAttributeValue;
122 r_ptr->data = &curves->geometry.wrap().offsets_for_write()[index];
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 curves->geometry.wrap().offsets_for_write().data(),
149 sizeof(int),
150 curves->geometry.curve_num,
151 false,
152 nullptr);
153}
154
155static int rna_Curves_curves_length(PointerRNA *ptr)
156{
157 const Curves *curves = rna_curves(ptr);
158 return curves->geometry.curve_num;
159}
160
161static bool rna_Curves_curves_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
162{
163 Curves *curves = rna_curves(ptr);
164 if (index < 0 || index >= curves->geometry.curve_num) {
165 return false;
166 }
167 r_ptr->owner_id = &curves->id;
168 r_ptr->type = &RNA_CurveSlice;
169 r_ptr->data = &curves->geometry.wrap().offsets_for_write()[index];
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 }
185 r_ptr->owner_id = &curves->id;
186 r_ptr->type = &RNA_FloatVectorAttributeValue;
187 r_ptr->data = &get_curves_positions_for_write(*curves)[index];
188 return true;
189}
190
191static void rna_Curves_position_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
192{
193 Curves *curves = rna_curves(ptr);
196 sizeof(float[3]),
197 curves->geometry.point_num,
198 false,
199 nullptr);
200}
201
202static int rna_CurvePoint_index_get(PointerRNA *ptr)
203{
204 return rna_CurvePoint_index_get_const(ptr);
205}
206
207static void rna_CurvePoint_location_get(PointerRNA *ptr, float value[3])
208{
209 copy_v3_v3(value, static_cast<const float *>(ptr->data));
210}
211
212static void rna_CurvePoint_location_set(PointerRNA *ptr, const float value[3])
213{
214 copy_v3_v3(static_cast<float *>(ptr->data), value);
215}
216
217static float rna_CurvePoint_radius_get(PointerRNA *ptr)
218{
219 using namespace blender;
220 const Curves *curves = rna_curves(ptr);
221 const bke::AttributeAccessor attributes = curves->geometry.wrap().attributes();
222 const VArray radii = *attributes.lookup_or_default<float>(
223 "radius", bke::AttrDomain::Point, 0.0f);
224 return radii[rna_CurvePoint_index_get_const(ptr)];
225}
226
227static void rna_CurvePoint_radius_set(PointerRNA *ptr, float value)
228{
229 using namespace blender;
230 Curves *curves = rna_curves(ptr);
231 bke::MutableAttributeAccessor attributes = curves->geometry.wrap().attributes_for_write();
232 bke::AttributeWriter radii = attributes.lookup_or_add_for_write<float>("radius",
233 bke::AttrDomain::Point);
234 if (!radii) {
235 return;
236 }
237 radii.varray.set(rna_CurvePoint_index_get_const(ptr), value);
238}
239
240static std::optional<std::string> rna_CurvePoint_path(const PointerRNA *ptr)
241{
242 return fmt::format("points[{}]", rna_CurvePoint_index_get_const(ptr));
243}
244
245bool rna_Curves_points_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
246{
247 Curves *curves = rna_curves(ptr);
248 if (index < 0 || index >= curves->geometry.point_num) {
249 return false;
250 }
251 r_ptr->owner_id = &curves->id;
252 r_ptr->type = &RNA_CurvePoint;
253 r_ptr->data = &get_curves_positions_for_write(*curves)[index];
254 return true;
255}
256
257static int rna_CurveSlice_index_get_const(const PointerRNA *ptr)
258{
259 Curves *curves = rna_curves(ptr);
260 return int(static_cast<int *>(ptr->data) - curves->geometry.curve_offsets);
261}
262
263static int rna_CurveSlice_index_get(PointerRNA *ptr)
264{
265 return rna_CurveSlice_index_get_const(ptr);
266}
267
268static std::optional<std::string> rna_CurveSlice_path(const PointerRNA *ptr)
269{
270 return fmt::format("curves[{}]", rna_CurveSlice_index_get_const(ptr));
271}
272
273static int rna_CurveSlice_first_point_index_get(PointerRNA *ptr)
274{
275 const int *offset_ptr = static_cast<int *>(ptr->data);
276 return *offset_ptr;
277}
278
279static int rna_CurveSlice_points_length_get(PointerRNA *ptr)
280{
281 const int *offset_ptr = static_cast<int *>(ptr->data);
282 const int offset = *offset_ptr;
283 return *(offset_ptr + 1) - offset;
284}
285
286static void rna_CurveSlice_points_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
287{
288 Curves *curves = rna_curves(ptr);
289 const int offset = rna_CurveSlice_first_point_index_get(ptr);
290 const int size = rna_CurveSlice_points_length_get(ptr);
291 float(*positions)[3] = get_curves_positions_for_write(*curves);
292 float(*co)[3] = positions + offset;
293 rna_iterator_array_begin(iter, co, sizeof(float[3]), size, 0, nullptr);
294}
295
296static void rna_Curves_normals_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
297{
298 Curves *curves = rna_curves(ptr);
300 const int size = curves->geometry.point_num;
301 rna_iterator_array_begin(iter, positions, sizeof(float[3]), size, true, nullptr);
302}
303
304static void rna_Curves_update_data(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
305{
306 ID *id = ptr->owner_id;
307 /* Avoid updates for importers creating curves. */
308 if (id->us > 0) {
309 DEG_id_tag_update(id, 0);
311 }
312}
313
314void rna_Curves_update_draw(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
315{
316 ID *id = ptr->owner_id;
317 /* Avoid updates for importers creating curves. */
318 if (id->us > 0) {
320 }
321}
322
323#else
324
326{
327 StructRNA *srna;
328 PropertyRNA *prop;
329
330 srna = RNA_def_struct(brna, "CurvePoint", nullptr);
331 RNA_def_struct_ui_text(srna, "Curve Point", "Curve control point");
332 RNA_def_struct_path_func(srna, "rna_CurvePoint_path");
333
334 prop = RNA_def_property(srna, "position", PROP_FLOAT, PROP_TRANSLATION);
335 RNA_def_property_array(prop, 3);
337 prop, "rna_CurvePoint_location_get", "rna_CurvePoint_location_set", nullptr);
338 RNA_def_property_ui_text(prop, "Position", "");
339 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
340
341 prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
343 prop, "rna_CurvePoint_radius_get", "rna_CurvePoint_radius_set", nullptr);
344 RNA_def_property_ui_text(prop, "Radius", "");
345 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
346
347 prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
349 RNA_def_property_int_funcs(prop, "rna_CurvePoint_index_get", nullptr, nullptr);
350 RNA_def_property_ui_text(prop, "Index", "Index of this point");
351}
352
353/* Defines a read-only vector type since normals can not be modified manually. */
355{
356 StructRNA *srna = RNA_def_struct(brna, "FloatVectorValueReadOnly", nullptr);
357 RNA_def_struct_sdna(srna, "vec3f");
358 RNA_def_struct_ui_text(srna, "Read-Only Vector", "");
359
360 PropertyRNA *prop = RNA_def_property(srna, "vector", PROP_FLOAT, PROP_DIRECTION);
361 RNA_def_property_ui_text(prop, "Vector", "3D vector");
362 RNA_def_property_float_sdna(prop, nullptr, "x");
363 RNA_def_property_array(prop, 3);
365}
366
368{
369 StructRNA *srna;
370 PropertyRNA *prop;
371
372 srna = RNA_def_struct(brna, "CurveSlice", nullptr);
373 RNA_def_struct_ui_text(srna, "Curve Slice", "A single curve from a curves data-block");
374 RNA_def_struct_path_func(srna, "rna_CurveSlice_path");
375
376 prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
377 RNA_def_property_struct_type(prop, "CurvePoint");
378 RNA_def_property_ui_text(prop, "Points", "Control points of the curve");
381 "rna_CurveSlice_points_begin",
382 "rna_iterator_array_next",
383 "rna_iterator_array_end",
384 "rna_iterator_array_get",
385 "rna_CurveSlice_points_length_get",
386 nullptr,
387 nullptr,
388 nullptr);
389
390 prop = RNA_def_property(srna, "first_point_index", PROP_INT, PROP_UNSIGNED);
392 RNA_def_property_int_funcs(prop, "rna_CurveSlice_first_point_index_get", nullptr, nullptr);
394 prop, "First Point Index", "The index of this curve's first control point");
395
396 prop = RNA_def_property(srna, "points_length", PROP_INT, PROP_UNSIGNED);
398 RNA_def_property_int_funcs(prop, "rna_CurveSlice_points_length_get", nullptr, nullptr);
399 RNA_def_property_ui_text(prop, "Number of Points", "Number of control points in the curve");
400
401 prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
403 RNA_def_property_int_funcs(prop, "rna_CurveSlice_index_get", nullptr, nullptr);
404 RNA_def_property_ui_text(prop, "Index", "Index of this curve");
405}
406
407static void rna_def_curves(BlenderRNA *brna)
408{
409 StructRNA *srna;
410 PropertyRNA *prop;
411
412 srna = RNA_def_struct(brna, "Curves", "ID");
413 RNA_def_struct_ui_text(srna, "Hair Curves", "Hair data-block for hair curves");
414 RNA_def_struct_ui_icon(srna, ICON_CURVES_DATA);
415
416 /* Point and Curve RNA API helpers. */
417
418 prop = RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
421 "rna_Curves_curves_begin",
422 "rna_iterator_array_next",
423 "rna_iterator_array_end",
424 "rna_iterator_array_get",
425 "rna_Curves_curves_length",
426 "rna_Curves_curves_lookup_int",
427 nullptr,
428 nullptr);
429 RNA_def_property_struct_type(prop, "CurveSlice");
430 RNA_def_property_ui_text(prop, "Curves", "All curves in the data-block");
431
432 prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
433 RNA_def_property_struct_type(prop, "CurvePoint");
436 "rna_Curves_position_data_begin",
437 "rna_iterator_array_next",
438 "rna_iterator_array_end",
439 "rna_iterator_array_get",
440 "rna_Curves_position_data_length",
441 "rna_Curves_points_lookup_int",
442 nullptr,
443 nullptr);
444 RNA_def_property_ui_text(prop, "Points", "Control points of all curves");
445
446 /* Direct access to built-in attributes. */
447
448 prop = RNA_def_property(srna, "position_data", PROP_COLLECTION, PROP_NONE);
451 "rna_Curves_position_data_begin",
452 "rna_iterator_array_next",
453 "rna_iterator_array_end",
454 "rna_iterator_array_get",
455 "rna_Curves_position_data_length",
456 "rna_Curves_position_data_lookup_int",
457 nullptr,
458 nullptr);
459 RNA_def_property_struct_type(prop, "FloatVectorAttributeValue");
460 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
461
462 prop = RNA_def_property(srna, "curve_offset_data", PROP_COLLECTION, PROP_NONE);
463 RNA_def_property_struct_type(prop, "IntAttributeValue");
466 "rna_Curves_curve_offset_data_begin",
467 "rna_iterator_array_next",
468 "rna_iterator_array_end",
469 "rna_iterator_array_get",
470 "rna_Curves_curve_offset_data_length",
471 "rna_Curves_curve_offset_data_lookup_int",
472 nullptr,
473 nullptr);
474 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
475
477
478 prop = RNA_def_property(srna, "normals", PROP_COLLECTION, PROP_NONE);
480 RNA_def_property_struct_type(prop, "FloatVectorValueReadOnly");
481 /* `lookup_int` isn't provided since the entire normals array is allocated and calculated when
482 * it's accessed. */
484 "rna_Curves_normals_begin",
485 "rna_iterator_array_next",
486 "rna_iterator_array_end",
487 "rna_iterator_array_get",
488 "rna_Curves_position_data_length",
489 nullptr,
490 nullptr,
491 nullptr);
493 prop, "Normals", "The curve normal value at each of the curve's control points");
494
495 /* materials */
496 prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
497 RNA_def_property_collection_sdna(prop, nullptr, "mat", "totcol");
498 RNA_def_property_struct_type(prop, "Material");
499 RNA_def_property_ui_text(prop, "Materials", "");
500 RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.cc */
502 nullptr,
503 nullptr,
504 nullptr,
505 nullptr,
506 nullptr,
507 nullptr,
508 nullptr,
509 "rna_IDMaterials_assign_int");
510
511 prop = RNA_def_property(srna, "surface", PROP_POINTER, PROP_NONE);
512 RNA_def_property_struct_type(prop, "Object");
514 RNA_def_property_pointer_funcs(prop, nullptr, nullptr, nullptr, "rna_Mesh_object_poll");
515 RNA_def_property_ui_text(prop, "Surface", "Mesh object that the curves can be attached to");
516 RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, nullptr);
517
518 prop = RNA_def_property(srna, "surface_uv_map", PROP_STRING, PROP_NONE);
519 RNA_def_property_string_sdna(prop, nullptr, "surface_uv_map");
521 "Surface UV Map",
522 "The name of the attribute on the surface mesh used to define the "
523 "attachment of each curve");
524 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
525
526 /* Symmetry. */
527 prop = RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
528 RNA_def_property_boolean_sdna(prop, nullptr, "symmetry", CURVES_SYMMETRY_X);
529 RNA_def_property_ui_text(prop, "X", "Enable symmetry in the X axis");
530 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
531
532 prop = RNA_def_property(srna, "use_mirror_y", PROP_BOOLEAN, PROP_NONE);
533 RNA_def_property_boolean_sdna(prop, nullptr, "symmetry", CURVES_SYMMETRY_Y);
534 RNA_def_property_ui_text(prop, "Y", "Enable symmetry in the Y axis");
535 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
536
537 prop = RNA_def_property(srna, "use_mirror_z", PROP_BOOLEAN, PROP_NONE);
538 RNA_def_property_boolean_sdna(prop, nullptr, "symmetry", CURVES_SYMMETRY_Z);
539 RNA_def_property_ui_text(prop, "Z", "Enable symmetry in the Z axis");
540 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
541
542 prop = RNA_def_property(srna, "selection_domain", PROP_ENUM, PROP_NONE);
544 RNA_def_property_ui_text(prop, "Selection Domain", "");
546 RNA_def_property_update(prop, 0, "rna_Curves_update_data");
547
548 prop = RNA_def_property(srna, "use_sculpt_collision", PROP_BOOLEAN, PROP_NONE);
551 prop, "Use Sculpt Collision", "Enable collision with the surface while sculpting");
553 RNA_def_property_update(prop, 0, "rna_Curves_update_draw");
554
555 /* attributes */
557
558 /* common */
560
561 RNA_api_curves(srna);
562}
563
565{
568 rna_def_curves(brna);
569}
570
571#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
@ CURVES_SYMMETRY_Y
@ CURVES_SYMMETRY_Z
@ CURVES_SYMMETRY_X
@ CV_SCULPT_COLLISION_ENABLED
@ PROP_FLOAT
Definition RNA_types.hh:67
@ PROP_BOOLEAN
Definition RNA_types.hh:65
@ PROP_ENUM
Definition RNA_types.hh:69
@ PROP_INT
Definition RNA_types.hh:66
@ PROP_STRING
Definition RNA_types.hh:68
@ PROP_POINTER
Definition RNA_types.hh:70
@ PROP_COLLECTION
Definition RNA_types.hh:71
@ PROPOVERRIDE_IGNORE
Definition RNA_types.hh:375
@ PROP_ANIMATABLE
Definition RNA_types.hh:220
@ PROP_EDITABLE
Definition RNA_types.hh:207
@ PROP_DIRECTION
Definition RNA_types.hh:165
@ PROP_DISTANCE
Definition RNA_types.hh:159
@ PROP_NONE
Definition RNA_types.hh:136
@ PROP_TRANSLATION
Definition RNA_types.hh:164
@ PROP_UNSIGNED
Definition RNA_types.hh:152
#define NC_GEOM
Definition WM_types.hh:360
#define ND_DRAW
Definition WM_types.hh:428
#define ND_DATA
Definition WM_types.hh:475
#define NC_OBJECT
Definition WM_types.hh:346
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
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, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
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_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
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_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_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
Definition DNA_ID.h:413
ID * owner_id
Definition RNA_types.hh:40
StructRNA * type
Definition RNA_types.hh:41
void * data
Definition RNA_types.hh:42
void WM_main_add_notifier(uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4126