30 {0,
nullptr, 0,
nullptr,
nullptr},
36 {0,
"DEFAULT", 0,
"Default",
""},
37 {0,
nullptr, 0,
nullptr,
nullptr},
51 {
PROP_ENUM,
"ENUM", 0,
"Enumeration",
""},
54 {0,
nullptr, 0,
nullptr,
nullptr},
61#define RNA_ENUM_PROPERTY_SUBTYPE_STRING_ITEMS \
62 {PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""}, \
63 {PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""}, \
64 {PROP_FILENAME, "FILE_NAME", 0, "File Name", ""}, \
65 {PROP_BYTESTRING, "BYTE_STRING", 0, "Byte String", ""}, \
66 {PROP_PASSWORD, "PASSWORD", 0, "Password", "A string that is displayed hidden ('********')"}
68#define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ITEMS \
69 {PROP_PIXEL, "PIXEL", 0, "Pixel", "A distance on screen"}, \
70 {PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""}, \
71 {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", "A percentage between 0 and 100"}, \
72 {PROP_FACTOR, "FACTOR", 0, "Factor", "A factor between 0.0 and 1.0"}, \
73 {PROP_ANGLE, "ANGLE", 0, "Angle", "A rotational value specified in radians"}, \
74 {PROP_TIME, "TIME", 0, "Time (Scene Relative)", \
75 "Time specified in frames, converted to seconds based on scene frame rate"}, \
76 {PROP_TIME_ABSOLUTE, "TIME_ABSOLUTE", 0, "Time (Absolute)", \
77 "Time specified in seconds, independent of the scene"}, \
78 {PROP_DISTANCE, "DISTANCE", 0, "Distance", "A distance between two points"}, \
79 {PROP_DISTANCE_CAMERA, "DISTANCE_CAMERA", 0, "Camera Distance", ""}, \
80 {PROP_POWER, "POWER", 0, "Power", ""}, \
81 {PROP_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""}, \
82 {PROP_WAVELENGTH, "WAVELENGTH", 0, "Wavelength", ""}, \
83 {PROP_COLOR_TEMPERATURE, "COLOR_TEMPERATURE", 0, "Color Temperature", ""}, \
84 {PROP_FREQUENCY, "FREQUENCY", 0, "Frequency", ""}
86#define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ARRAY_ITEMS \
87 {PROP_COLOR, "COLOR", 0, "Linear Color", "Color in the linear space"}, \
88 {PROP_TRANSLATION, "TRANSLATION", 0, "Translation", "Color in the gamma corrected space"}, \
89 {PROP_DIRECTION, "DIRECTION", 0, "Direction", ""}, \
90 {PROP_VELOCITY, "VELOCITY", 0, "Velocity", ""}, \
91 {PROP_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""}, \
92 {PROP_MATRIX, "MATRIX", 0, "Matrix", ""}, \
93 {PROP_EULER, "EULER", 0, "Euler Angles", "Euler rotation angles in radians"}, \
94 {PROP_QUATERNION, "QUATERNION", 0, "Quaternion", "Quaternion rotation (affects NLA blending)"}, \
95 {PROP_AXISANGLE, "AXISANGLE", 0, "Axis-Angle", "Angle and axis to rotate around"}, \
96 {PROP_XYZ, "XYZ", 0, "XYZ", ""}, \
97 {PROP_XYZ_LENGTH, "XYZ_LENGTH", 0, "XYZ Length", ""}, \
98 {PROP_COLOR_GAMMA, "COLOR_GAMMA", 0, "Gamma-Corrected Color", ""}, \
99 {PROP_COORDS, "COORDINATES", 0, "Coordinates", ""}, \
101 {PROP_LAYER, "LAYER", 0, "Layer", ""}, \
102 {PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""}
110 {0,
nullptr, 0,
nullptr,
nullptr},
117 {0,
nullptr, 0,
nullptr,
nullptr},
124 {0,
nullptr, 0,
nullptr,
nullptr},
139 {0,
nullptr, 0,
nullptr,
nullptr},
159 {0,
nullptr, 0,
nullptr,
nullptr},
164 "For operators: hide from places in the user interface where Blender would add the property "
165 "automatically, like Adjust Last Operation. Also this property is not written to presets.";
167 "For operators: the value of this property will not be remembered between invocations of the "
168 "operator; instead, each invocation will start by using the default value. Also this "
169 "property is not written to presets.";
173 "This property can be edited, even when it is used on linked data (which normally is "
174 "read-only). Note that edits to the property will not be saved to the blend file.";
189 "Adjust values proportionally to each other",
194 "Update on every keystroke in textedit 'mode'",
197 {0,
nullptr, 0,
nullptr,
nullptr},
207 {0,
nullptr, 0,
nullptr,
nullptr},
212 "LIBRARY_OVERRIDABLE",
214 "Library Overridable",
215 "Make that property editable in library overrides of linked data-blocks.\n"
216 "NOTE: For a property to be overridable, its whole chain of parent properties must also be "
217 "defined as overridable"};
221 {0,
nullptr, 0,
nullptr,
nullptr},
230 "Do not use the names of the items, only their indices in the collection"},
235 "Allow users to add new items in that collection in library overrides"},
236 {0,
nullptr, 0,
nullptr,
nullptr},
245 "Search results are suggestions (other values may be entered)"},
247 {0,
nullptr, 0,
nullptr,
nullptr},
265# include <fmt/format.h>
267static CLG_LogRef LOG_COMPARE_OVERRIDE = {
"rna.rna_compare_override"};
271static void rna_Struct_identifier_get(
PointerRNA *
ptr,
char *value)
281static void rna_Struct_description_get(
PointerRNA *
ptr,
char *value)
301static void rna_Struct_translation_context_get(
PointerRNA *
ptr,
char *value)
306static int rna_Struct_translation_context_length(
PointerRNA *
ptr)
351 }
while ((ptype = ptype->
base));
385 for (i = iter->
level; i > 0; i--) {
405 rna_inheritance_next_level_restart(iter, skip, 0);
412 rna_inheritance_next_level_restart(iter, skip, 0);
420 rna_inheritance_next_level_restart(iter, skip, 1);
427 rna_inheritance_next_level_restart(iter, skip, 1);
435 if (internal->
flag) {
441 rna_inheritance_properties_listbase_next(iter, rna_property_builtin);
469 rna_inheritance_properties_listbase_begin(iter, &srna->cont.properties, rna_property_builtin);
483 rna_inheritance_functions_listbase_next(iter, rna_function_builtin);
498 rna_inheritance_functions_listbase_begin(iter, &srna->functions, rna_function_builtin);
518 iter, (
void *)tag_defines,
sizeof(
EnumPropertyItem), tag_count, 0,
nullptr);
530 newptr.
type = &RNA_Struct;
543 rna_Struct_properties_begin(iter, &newptr);
548 rna_Struct_properties_next(iter);
553 return rna_Struct_properties_get(iter);
569 propptr.
type = &RNA_Property;
580 propptr.
type = &RNA_Property;
588 }
while ((srna = srna->
base));
605 return &RNA_BoolProperty;
607 return &RNA_IntProperty;
609 return &RNA_FloatProperty;
611 return &RNA_StringProperty;
613 return &RNA_EnumProperty;
615 return &RNA_PointerProperty;
617 return &RNA_CollectionProperty;
619 return &RNA_Property;
623static void rna_Property_identifier_get(
PointerRNA *
ptr,
char *value)
635static void rna_Property_name_get(
PointerRNA *
ptr,
char *value)
639 strcpy(value, name ? name :
"");
646 return name ? strlen(name) : 0;
649static void rna_Property_description_get(
PointerRNA *
ptr,
char *value)
653 strcpy(value, description ? description :
"");
659 return description ? strlen(description) : 0;
662static void rna_Property_translation_context_get(
PointerRNA *
ptr,
char *value)
668static int rna_Property_translation_context_length(
PointerRNA *
ptr)
745static bool rna_Property_is_argument_optional_get(
PointerRNA *
ptr)
781static bool rna_Property_is_library_editable_flag_get(
PointerRNA *
ptr)
787static bool rna_Property_is_path_output_flag_get(
PointerRNA *
ptr)
810 struct_tags !=
nullptr && struct_tags->
identifier !=
nullptr;
813 memcpy(&tmp, struct_tags,
sizeof(tmp));
829static void rna_Property_array_dimensions_get(
PointerRNA *
ptr,
837 dimensions[i] = (i >= prop->
arraydimension) ? 0 : prop->arraylength[i];
852static bool rna_Property_is_registered_optional_get(
PointerRNA *
ptr)
878static int rna_NumberProperty_default_array_get_length(
const PointerRNA *
ptr,
895static void rna_IntProperty_default_array_get(
PointerRNA *
ptr,
int *values)
905static void rna_BoolProperty_default_array_get(
PointerRNA *
ptr,
bool *values)
915static void rna_FloatProperty_default_array_get(
PointerRNA *
ptr,
float *values)
1008static void rna_StringProperty_default_get(
PointerRNA *
ptr,
char *value)
1014static int rna_StringProperty_default_length(
PointerRNA *
ptr)
1021static int rna_StringProperty_max_length_get(
PointerRNA *
ptr)
1044 if ((eprop->
item_fn ==
nullptr) || (eprop->
item_fn == rna_EnumProperty_default_itemf) ||
1045 (
ptr->
type == &RNA_EnumProperty) || (C ==
nullptr))
1095 rna_EnumProperty_items_begin_impl(iter,
ptr, rna_enum_check_separator);
1101 rna_EnumProperty_items_begin_impl(iter,
ptr,
nullptr);
1104static void rna_EnumPropertyItem_identifier_get(
PointerRNA *
ptr,
char *value)
1109static int rna_EnumPropertyItem_identifier_length(
PointerRNA *
ptr)
1114static void rna_EnumPropertyItem_name_get(
PointerRNA *
ptr,
char *value)
1120 strcpy(value, eprop->
name);
1131 return strlen(eprop->
name);
1136static void rna_EnumPropertyItem_description_get(
PointerRNA *
ptr,
char *value)
1148static int rna_EnumPropertyItem_description_length(
PointerRNA *
ptr)
1184static void rna_Function_identifier_get(
PointerRNA *
ptr,
char *value)
1194static void rna_Function_description_get(
PointerRNA *
ptr,
char *value)
1216static bool rna_Function_registered_optional_get(
PointerRNA *
ptr)
1261 if (srna !=
nullptr) {
1269static bool rna_BlenderRNA_structs_lookup_string(
PointerRNA *
ptr,
1275 if (srna !=
nullptr) {
1289struct RNACompareOverrideDiffPropPtrContext {
1294 ID *owner_id_a =
nullptr;
1295 ID *owner_id_b =
nullptr;
1304 bool no_ownership =
false;
1309 bool no_prop_name =
false;
1312 bool do_force_name =
false;
1314 bool use_id_pointer =
false;
1325 bool has_liboverride_apply_cb =
false;
1331 std::optional<std::string> rna_itemname_a;
1332 std::optional<std::string> rna_itemname_b;
1333 std::optional<ID *> rna_itemid_a;
1334 std::optional<ID *> rna_itemid_b;
1335 int rna_itemindex_a = -1;
1336 int rna_itemindex_b = -1;
1345 bool is_valid_for_diffing =
true;
1348 bool is_null =
false;
1349 bool is_type_diff =
false;
1352 : rnadiff_ctx(rnadiff_ctx_)
1356static void rna_property_override_diff_propptr_validate_diffing(
1357 RNACompareOverrideDiffPropPtrContext &ptrdiff_ctx)
1359 PointerRNA *propptr_a = &ptrdiff_ctx.propptr_a;
1360 PointerRNA *propptr_b = &ptrdiff_ctx.propptr_b;
1361 const bool no_ownership = ptrdiff_ctx.no_ownership;
1362 const bool no_prop_name = ptrdiff_ctx.no_prop_name;
1363 const bool do_force_name = ptrdiff_ctx.do_force_name;
1365 ptrdiff_ctx.is_valid_for_diffing =
true;
1369 if (do_force_name || ptrdiff_ctx.use_id_pointer) {
1375 if (
ELEM(
nullptr, propptr_b, propptr_b->
type, propptr_b->
data)) {
1376 ptrdiff_ctx.is_null =
true;
1380 ptrdiff_ctx.is_null =
true;
1381 ptrdiff_ctx.is_type_diff = propptr_a->
type != propptr_b->
type;
1383 ptrdiff_ctx.is_valid_for_diffing =
false;
1387 ptrdiff_ctx.is_null = (
ELEM(
nullptr, propptr_b, propptr_b->
type, propptr_b->
data));
1388 ptrdiff_ctx.is_type_diff = (propptr_b ==
nullptr || propptr_b->
type != propptr_a->
type);
1389 ptrdiff_ctx.is_valid_for_diffing = !((ptrdiff_ctx.is_id && no_ownership) ||
1390 ptrdiff_ctx.is_null || ptrdiff_ctx.is_type_diff);
1397 if (!no_prop_name && (ptrdiff_ctx.is_valid_for_diffing || do_force_name)) {
1401 PropertyRNA *nameprop_b = (propptr_b !=
nullptr && propptr_b->
type !=
nullptr) ?
1404 const bool do_id_pointer = ptrdiff_ctx.use_id_pointer && ptrdiff_ctx.is_id;
1410 int rna_itemname_a_len = 0, rna_itemname_b_len = 0;
1411 char *rna_itemname_a =
nullptr;
1412 char *rna_itemname_b =
nullptr;
1415 if (nameprop_a !=
nullptr) {
1417 propptr_a, nameprop_a, buff_a,
sizeof(buff_a), &rna_itemname_a_len);
1419 ptrdiff_ctx.rna_itemname_a = rna_itemname_a;
1422 if (nameprop_b !=
nullptr) {
1424 propptr_b, nameprop_b, buff_b,
sizeof(buff_b), &rna_itemname_b_len);
1425 ptrdiff_ctx.rna_itemname_b = rna_itemname_b;
1431 ID *rna_itemid_a = (do_id_pointer && propptr_a->
data) ?
static_cast<ID *
>(propptr_a->
data) :
1433 ID *rna_itemid_b = (do_id_pointer && propptr_b->
data) ?
static_cast<ID *
>(propptr_b->
data) :
1435 if (do_id_pointer) {
1436 ptrdiff_ctx.rna_itemid_a = rna_itemid_a;
1437 ptrdiff_ctx.rna_itemid_b = rna_itemid_b;
1440 if (rna_itemname_a !=
nullptr && rna_itemname_b !=
nullptr) {
1441 if (rna_itemid_a != rna_itemid_b || rna_itemname_a_len != rna_itemname_b_len ||
1442 rna_itemname_a[0] != rna_itemname_b[0] || !
STREQ(rna_itemname_a, rna_itemname_b))
1444 ptrdiff_ctx.is_valid_for_diffing =
false;
1448 if (
UNLIKELY(rna_itemname_a && rna_itemname_a != buff_a)) {
1451 if (
UNLIKELY(rna_itemname_b && rna_itemname_b != buff_b)) {
1456 if (ptrdiff_ctx.is_id) {
1462static void rna_property_override_diff_propptr(
Main *bmain,
1463 RNACompareOverrideDiffPropPtrContext &ptrdiff_ctx)
1465 ID *owner_id_a = ptrdiff_ctx.owner_id_a;
1466 ID *owner_id_b = ptrdiff_ctx.owner_id_b;
1467 PointerRNA *propptr_a = &ptrdiff_ctx.propptr_a;
1468 PointerRNA *propptr_b = &ptrdiff_ctx.propptr_b;
1471 const bool no_ownership = ptrdiff_ctx.no_ownership;
1474 const eRNAOverrideMatch liboverride_flags = ptrdiff_ctx.rnadiff_ctx.liboverride_flags;
1475 const char *rna_path = ptrdiff_ctx.rnadiff_ctx.rna_path;
1476 size_t rna_path_len = ptrdiff_ctx.rnadiff_ctx.rna_path_len;
1477 const PropertyType property_type = ptrdiff_ctx.property_type;
1479 std::optional<std::string> &rna_itemname_a = ptrdiff_ctx.rna_itemname_a;
1480 std::optional<std::string> &rna_itemname_b = ptrdiff_ctx.rna_itemname_b;
1481 const int rna_itemindex_a = ptrdiff_ctx.rna_itemindex_a;
1482 const int rna_itemindex_b = ptrdiff_ctx.rna_itemindex_b;
1486 rna_property_override_diff_propptr_validate_diffing(ptrdiff_ctx);
1490 const bool is_valid_for_diffing = ptrdiff_ctx.is_valid_for_diffing;
1491 const bool is_id = ptrdiff_ctx.is_id;
1492 const bool is_null = ptrdiff_ctx.is_null;
1493 const bool is_type_diff = ptrdiff_ctx.is_type_diff;
1495 const bool has_liboverride_apply_cb = ptrdiff_ctx.has_liboverride_apply_cb;
1496 const bool do_create = (liboverride !=
nullptr &&
1499 (is_id || has_liboverride_apply_cb) &&
1501 rna_path !=
nullptr);
1519 if (no_ownership || is_null || is_type_diff || !is_valid_for_diffing) {
1523 ptrdiff_ctx.rnadiff_ctx.comparison = (propptr_a->
data != propptr_b->
data);
1525 if (do_create && ptrdiff_ctx.rnadiff_ctx.comparison != 0) {
1526 bool created =
false;
1528 liboverride, rna_path, &created);
1531 if (op !=
nullptr) {
1540 if (created || (rna_itemname_a && !rna_itemname_a->empty()) ||
1541 (rna_itemname_b && !rna_itemname_b->empty()) || rna_itemindex_a != -1 ||
1542 rna_itemindex_b != -1)
1544 const char *subitem_refname = rna_itemname_b ? rna_itemname_b->c_str() :
nullptr;
1545 const char *subitem_locname = rna_itemname_a ? rna_itemname_a->c_str() :
nullptr;
1550 ptrdiff_ctx.rna_itemid_b,
1551 ptrdiff_ctx.rna_itemid_a,
1559 op->
tag &= ~LIBOVERRIDE_PROP_OP_TAG_UNUSED;
1560 opop->
tag &= ~LIBOVERRIDE_PROP_OP_TAG_UNUSED;
1569 if (is_id && no_ownership) {
1570 if (opop ==
nullptr) {
1571 const char *subitem_refname = rna_itemname_b ? rna_itemname_b->c_str() :
nullptr;
1572 const char *subitem_locname = rna_itemname_a ? rna_itemname_a->c_str() :
nullptr;
1576 ptrdiff_ctx.rna_itemid_b,
1577 ptrdiff_ctx.rna_itemid_a,
1582 opop->
tag &= ~LIBOVERRIDE_PROP_OP_TAG_UNUSED;
1587 ID *id_a =
static_cast<ID *
>(propptr_a->
data);
1588 ID *id_b =
static_cast<ID *
>(propptr_b->
data);
1589 if (
ELEM(
nullptr, id_a, id_b)) {
1592 opop->
flag &= ~LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE;
1602 "Not checking matching ID pointer properties, since owner %s is tagged as "
1603 "needing resync.\n",
1617 opop->
flag &= ~LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE;
1626# define RNA_PATH_BUFFSIZE 8192
1629 char *extended_rna_path = extended_rna_path_buffer;
1630 size_t extended_rna_path_len = 0;
1636 if ((rna_itemname_a && !rna_itemname_a->empty()) &&
1637 (rna_itemname_b && !rna_itemname_b->empty()))
1639 BLI_assert(*rna_itemname_a == *rna_itemname_b);
1643 esc_item_name, rna_itemname_a->c_str(),
sizeof(esc_item_name));
1644 extended_rna_path_len = rna_path_len + 2 + esc_item_name_len + 2;
1646 extended_rna_path =
static_cast<char *
>(
1647 MEM_mallocN(extended_rna_path_len + 1, __func__));
1650 memcpy(extended_rna_path, rna_path, rna_path_len);
1651 extended_rna_path[rna_path_len] =
'[';
1652 extended_rna_path[rna_path_len + 1] =
'"';
1653 memcpy(extended_rna_path + rna_path_len + 2, esc_item_name, esc_item_name_len);
1654 extended_rna_path[rna_path_len + 2 + esc_item_name_len] =
'"';
1655 extended_rna_path[rna_path_len + 2 + esc_item_name_len + 1] =
']';
1656 extended_rna_path[extended_rna_path_len] =
'\0';
1658 else if (rna_itemindex_a != -1) {
1659 BLI_assert(rna_itemindex_a == rna_itemindex_b);
1662 char item_index_buff[32];
1663 size_t item_index_buff_len = 0;
1664 if (rna_itemindex_a == 0) {
1665 item_index_buff[0] =
'0';
1666 item_index_buff_len = 1;
1670 for (index = rna_itemindex_a;
1671 index > 0 && item_index_buff_len <
sizeof(item_index_buff);
1674 item_index_buff[item_index_buff_len++] =
'0' + char(index % 10);
1679 extended_rna_path_len = rna_path_len + item_index_buff_len + 2;
1681 extended_rna_path =
static_cast<char *
>(
1682 MEM_mallocN(extended_rna_path_len + 1, __func__));
1685 memcpy(extended_rna_path, rna_path, rna_path_len);
1686 extended_rna_path[rna_path_len] =
'[';
1687 for (
size_t i = 1; i <= item_index_buff_len; i++) {
1690 extended_rna_path[rna_path_len + i] = item_index_buff[item_index_buff_len - i];
1692 extended_rna_path[rna_path_len + 1 + item_index_buff_len] =
']';
1693 extended_rna_path[extended_rna_path_len] =
'\0';
1696 extended_rna_path = (
char *)rna_path;
1697 extended_rna_path_len = rna_path_len;
1705 extended_rna_path_len,
1708 &ptrdiff_ctx.rnadiff_ctx.report_flag);
1709 ptrdiff_ctx.rnadiff_ctx.comparison = !match;
1719 if (op !=
nullptr) {
1720 op->
tag &= ~LIBOVERRIDE_PROP_OP_TAG_UNUSED;
1723 if (!
ELEM(extended_rna_path, extended_rna_path_buffer, rna_path)) {
1727# undef RNA_PATH_BUFFSIZE
1733 ptrdiff_ctx.rnadiff_ctx.comparison = !
RNA_struct_equals(bmain, propptr_a, propptr_b, mode);
1737# define RNA_PROPERTY_GET_SINGLE(_typename, _ptr, _prop, _index) \
1738 (is_array ? RNA_property_##_typename##_get_index((_ptr), (_prop), (_index)) : \
1739 RNA_property_##_typename##_get((_ptr), (_prop)))
1740# define RNA_PROPERTY_SET_SINGLE(_typename, _ptr, _prop, _index, _value) \
1741 (is_array ? RNA_property_##_typename##_set_index((_ptr), (_prop), (_index), (_value)) : \
1742 RNA_property_##_typename##_set((_ptr), (_prop), (_value)))
1761 const char *rna_path = rnadiff_ctx.
rna_path;
1769 const bool do_create = liboverride !=
nullptr &&
1771 rna_path !=
nullptr;
1776 bool created =
false;
1779 switch (rna_prop_type) {
1783 bool *array_a, *array_b;
1795 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
bool) * len_a);
1797 if (do_create && rnadiff_ctx.
comparison != 0) {
1801 if (op !=
nullptr && created) {
1820 if (array_a != array_stack_a) {
1823 if (array_b != array_stack_b) {
1830 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
1832 if (do_create && rnadiff_ctx.
comparison != 0) {
1835 if (op !=
nullptr && created) {
1857 int *array_a, *array_b;
1869 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
int) * len_a);
1871 if (do_create && rnadiff_ctx.
comparison != 0) {
1875 if (op !=
nullptr && created) {
1896 if (array_a != array_stack_a) {
1899 if (array_b != array_stack_b) {
1906 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
1908 if (do_create && rnadiff_ctx.
comparison != 0) {
1911 if (op !=
nullptr && created) {
1933 float *array_a, *array_b;
1936 MEM_mallocN(
sizeof(
float) * len_a,
"RNA equals") :
1939 MEM_mallocN(
sizeof(
float) * len_b,
"RNA equals") :
1945 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
float) * len_a);
1947 if (do_create && rnadiff_ctx.
comparison != 0) {
1951 if (op !=
nullptr && created) {
1970 if (array_a != array_stack_a) {
1973 if (array_b != array_stack_b) {
1980 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
1982 if (do_create && rnadiff_ctx.
comparison != 0) {
1985 if (op !=
nullptr && created) {
2009 if (do_create && rnadiff_ctx.
comparison != 0) {
2012 if (op !=
nullptr && created) {
2031 char fixed_a[4096], fixed_b[4096];
2032 int len_str_a, len_str_b;
2034 ptr_a, rawprop_a, fixed_a,
sizeof(fixed_a), &len_str_a);
2036 ptr_b, rawprop_b, fixed_b,
sizeof(fixed_b), &len_str_b);
2041 rnadiff_ctx.
comparison = len_str_a < len_str_b ? -1 :
2042 len_str_a > len_str_b ? 1 :
2043 strcmp(value_a, value_b);
2045 rnadiff_ctx.
comparison = strcmp(value_a, value_b);
2047 if (do_create && rnadiff_ctx.
comparison != 0) {
2050 if (op !=
nullptr && created) {
2066 if (value_a != fixed_a) {
2069 if (value_b != fixed_b) {
2085 RNACompareOverrideDiffPropPtrContext ptrdiff_ctx(rnadiff_ctx);
2086 ptrdiff_ctx.owner_id_a = ptr_a->
owner_id;
2087 ptrdiff_ctx.owner_id_b = ptr_b->
owner_id;
2090 ptrdiff_ctx.no_prop_name =
true;
2091 ptrdiff_ctx.no_ownership = no_ownership;
2100 ptrdiff_ctx.has_liboverride_apply_cb =
true;
2102 rna_property_override_diff_propptr(bmain, ptrdiff_ctx);
2117 if (!has_liboverride_apply_cb &&
2121 "RNA collection '%s' defined as supporting liboverride insertion of items, but "
2122 "no liboverride apply callback defined for it. No insertion will happen.",
2128 const bool use_collection_insertion = has_liboverride_apply_cb && do_create &&
2136 std::optional<std::string> prev_rna_itemname_a;
2137 std::optional<ID *> prev_rna_itemid_a;
2143 if (use_collection_insertion) {
2147 if (op !=
nullptr) {
2157 for (; iter_a.
valid && !abort;) {
2159 bool is_valid_for_insertion = use_collection_insertion;
2161 RNACompareOverrideDiffPropPtrContext ptrdiff_ctx(rnadiff_ctx);
2162 ptrdiff_ctx.owner_id_a = ptr_a->
owner_id;
2163 ptrdiff_ctx.owner_id_b = ptr_b->
owner_id;
2164 ptrdiff_ctx.propptr_a = iter_a.
ptr;
2166 ptrdiff_ctx.propptr_b = iter_b.
ptr;
2168 ptrdiff_ctx.no_prop_name = no_prop_name;
2169 ptrdiff_ctx.do_force_name = !no_prop_name;
2170 ptrdiff_ctx.use_id_pointer = !no_prop_name;
2171 ptrdiff_ctx.no_ownership = no_ownership;
2173 ptrdiff_ctx.has_liboverride_apply_cb = has_liboverride_apply_cb;
2175 if (iter_b.
valid || use_collection_insertion) {
2176 rna_property_override_diff_propptr_validate_diffing(ptrdiff_ctx);
2179 ptrdiff_ctx.no_prop_name =
true;
2180 ptrdiff_ctx.do_force_name =
false;
2181 ptrdiff_ctx.use_id_pointer =
false;
2184 const bool is_valid_for_diffing = ptrdiff_ctx.is_valid_for_diffing;
2185 const bool is_id = ptrdiff_ctx.is_id;
2188 if (is_id || is_valid_for_diffing) {
2189 is_valid_for_insertion =
false;
2195 "Checking %s, %s [%d] vs %s [%d]; is_id: %d, diffing: %d; "
2196 "insert: %d (could be used: %d, do_create: %d)\n",
2198 ptrdiff_ctx.rna_itemname_a ? ptrdiff_ctx.rna_itemname_a->c_str() :
"",
2200 ptrdiff_ctx.rna_itemname_b ? ptrdiff_ctx.rna_itemname_b->c_str() :
"",
2203 is_valid_for_diffing,
2204 is_valid_for_insertion,
2205 use_collection_insertion,
2210 if (!(is_id || is_valid_for_diffing || is_valid_for_insertion)) {
2225 if (is_valid_for_insertion && use_collection_insertion) {
2231 (no_prop_name || !prev_rna_itemname_a) ?
nullptr : prev_rna_itemname_a->c_str(),
2232 (no_prop_name || !ptrdiff_ctx.rna_itemname_a) ?
2234 ptrdiff_ctx.rna_itemname_a->c_str(),
2236 ptrdiff_ctx.rna_itemid_a,
2243 printf(
"%s: Adding insertion op override after '%s'/%d\n",
2245 prev_rna_itemname_a ? prev_rna_itemname_a->c_str() :
"",
2252 else if (is_id || is_valid_for_diffing) {
2253 if (equals || do_create) {
2254 ptrdiff_ctx.rna_itemindex_a = idx_a;
2255 ptrdiff_ctx.rna_itemindex_b = idx_b;
2256 rna_property_override_diff_propptr(bmain, ptrdiff_ctx);
2257 equals = equals && (rnadiff_ctx.
comparison == 0);
2261 if (ptrdiff_ctx.rna_itemname_a) {
2262 prev_rna_itemname_a = std::move(*ptrdiff_ctx.rna_itemname_a);
2265 prev_rna_itemname_a.reset();
2267 prev_rna_itemid_a = ptrdiff_ctx.rna_itemid_a;
2269 if (!do_create && !equals) {
2274 if (!(use_collection_insertion && !(is_id || is_valid_for_diffing))) {
2282 }
while (iter_a.
valid);
2295 equals = equals && !(iter_a.
valid || iter_b.
valid) && !abort;
2307 if (op !=
nullptr) {
2325 const int len_local,
2326 const int len_reference,
2327 const int len_storage,
2330 BLI_assert(len_local == len_reference && (!ptr_storage || len_local == len_storage));
2333 bool changed =
false;
2334 const bool is_array = len_local > 0;
2352 BLI_assert_msg(0,
"Boolean properties support no override diff operation");
2355 int prop_min, prop_max;
2358 if (is_array && index == -1) {
2360 int *array_a, *array_b;
2363 MEM_mallocN(
sizeof(*array_a) * len_local, __func__) :
2375 MEM_mallocN(
sizeof(*array_b) * len_local, __func__) :
2378 for (
int i = len_local; i--;) {
2379 array_b[i] = fac * (array_b[i] - array_a[i]);
2380 if (array_b[i] < prop_min || array_b[i] > prop_max) {
2382 for (
int j = len_local; j--;) {
2383 array_b[j] = j >= i ? -array_b[j] : fac * (array_a[j] - array_b[j]);
2384 if (array_b[j] < prop_min || array_b[j] > prop_max) {
2399 if (array_b != array_stack_b) {
2405 BLI_assert_msg(0,
"Unsupported RNA override diff operation on integer");
2409 if (array_a != array_stack_a) {
2414 const int value = RNA_PROPERTY_GET_SINGLE(
int, ptr_reference, prop_reference, index);
2422 int b = fac * (RNA_PROPERTY_GET_SINGLE(
int, ptr_local, prop_local, index) - value);
2432 RNA_PROPERTY_SET_SINGLE(
int, ptr_storage, prop_storage, index,
b);
2436 BLI_assert_msg(0,
"Unsupported RNA override diff operation on integer");
2443 float prop_min, prop_max;
2446 if (is_array && index == -1) {
2448 float *array_a, *array_b;
2451 MEM_mallocN(
sizeof(*array_a) * len_local, __func__) :
2462 array_b =
static_cast<float *
>(
2464 MEM_mallocN(
sizeof(*array_b) * len_local, __func__) :
2467 for (
int i = len_local; i--;) {
2468 array_b[i] = fac * (array_b[i] - array_a[i]);
2469 if (array_b[i] < prop_min || array_b[i] > prop_max) {
2471 for (
int j = len_local; j--;) {
2472 array_b[j] = j >= i ? -array_b[j] : fac * (array_a[j] - array_b[j]);
2473 if (array_b[j] < prop_min || array_b[j] > prop_max) {
2488 if (array_b != array_stack_b) {
2495 array_b =
static_cast<float *
>(
2497 MEM_mallocN(
sizeof(*array_b) * len_local, __func__) :
2500 for (
int i = len_local; i--;) {
2501 array_b[i] = array_a[i] == 0.0f ? array_b[i] : array_b[i] / array_a[i];
2502 if (array_b[i] < prop_min || array_b[i] > prop_max) {
2512 if (array_b != array_stack_b) {
2518 BLI_assert_msg(0,
"Unsupported RNA override diff operation on float");
2522 if (array_a != array_stack_a) {
2527 const float value = RNA_PROPERTY_GET_SINGLE(
float, ptr_reference, prop_reference, index);
2535 float b = fac * (RNA_PROPERTY_GET_SINGLE(
float, ptr_local, prop_local, index) - value);
2545 RNA_PROPERTY_SET_SINGLE(
float, ptr_storage, prop_storage, index,
b);
2550 (value == 0.0f ? 1.0f : value);
2560 BLI_assert_msg(0,
"Unsupported RNA override diff operation on float");
2568 BLI_assert_msg(0,
"Enum properties support no override diff operation");
2571 BLI_assert_msg(0,
"Pointer properties support no override diff operation");
2574 BLI_assert_msg(0,
"String properties support no override diff operation");
2578 BLI_assert_msg(0,
"Collection properties support no override diff operation");
2596 const int len_dst = rnaapply_ctx.
len_src;
2597 const int len_src = rnaapply_ctx.
len_src;
2606 if (prop_src_type != prop_dst_type ||
2613 "%s.%s: Inconsistency between stored property type (%d) and linked reference one "
2614 "(%d), skipping liboverride apply",
2616 prop_rna_path ? prop_rna_path->c_str() :
2617 fmt::
format(
" ... .{}", prop_dst->name).c_str(),
2627 BLI_assert(len_dst == len_src && (!prop_storage || len_dst == len_storage));
2630 const bool is_array = len_dst > 0;
2632 const short override_op = opop->
operation;
2634 bool ret_success =
true;
2638 if (is_array && index == -1) {
2643 MEM_mallocN(
sizeof(*array_a) * len_dst, __func__) :
2648 switch (override_op) {
2653 BLI_assert_msg(0,
"Unsupported RNA override operation on boolean");
2657 if (array_a != array_stack_a) {
2662 const bool value = RNA_PROPERTY_GET_SINGLE(
boolean, ptr_src, prop_src, index);
2664 switch (override_op) {
2666 RNA_PROPERTY_SET_SINGLE(
boolean, ptr_dst, prop_dst, index, value);
2669 BLI_assert_msg(0,
"Unsupported RNA override operation on boolean");
2675 if (is_array && index == -1) {
2677 int *array_a, *array_b;
2680 MEM_mallocN(
sizeof(*array_a) * len_dst, __func__) :
2683 switch (override_op) {
2692 MEM_mallocN(
sizeof(*array_b) * len_dst, __func__) :
2696 for (
int i = len_dst; i--;) {
2697 array_a[i] += array_b[i];
2701 for (
int i = len_dst; i--;) {
2702 array_a[i] -= array_b[i];
2706 if (array_b != array_stack_b) {
2711 BLI_assert_msg(0,
"Unsupported RNA override operation on integer");
2715 if (array_a != array_stack_a) {
2720 const int storage_value = prop_storage ? RNA_PROPERTY_GET_SINGLE(
2721 int, ptr_storage, prop_storage, index) :
2724 switch (override_op) {
2726 RNA_PROPERTY_SET_SINGLE(
int,
2730 RNA_PROPERTY_GET_SINGLE(
int, ptr_src, prop_src, index));
2733 RNA_PROPERTY_SET_SINGLE(
int,
2737 RNA_PROPERTY_GET_SINGLE(
int, ptr_dst, prop_dst, index) -
2741 RNA_PROPERTY_SET_SINGLE(
int,
2745 RNA_PROPERTY_GET_SINGLE(
int, ptr_dst, prop_dst, index) -
2749 BLI_assert_msg(0,
"Unsupported RNA override operation on integer");
2755 if (is_array && index == -1) {
2757 float *array_a, *array_b;
2760 MEM_mallocN(
sizeof(*array_a) * len_dst, __func__) :
2763 switch (override_op) {
2773 MEM_mallocN(
sizeof(*array_b) * len_dst, __func__) :
2777 for (
int i = len_dst; i--;) {
2778 array_a[i] += array_b[i];
2782 for (
int i = len_dst; i--;) {
2783 array_a[i] -= array_b[i];
2787 for (
int i = len_dst; i--;) {
2788 array_a[i] *= array_b[i];
2792 if (array_b != array_stack_b) {
2797 BLI_assert_msg(0,
"Unsupported RNA override operation on float");
2801 if (array_a != array_stack_a) {
2806 const float storage_value = prop_storage ? RNA_PROPERTY_GET_SINGLE(
2807 float, ptr_storage, prop_storage, index) :
2810 switch (override_op) {
2812 RNA_PROPERTY_SET_SINGLE(
float,
2816 RNA_PROPERTY_GET_SINGLE(
float, ptr_src, prop_src, index));
2819 RNA_PROPERTY_SET_SINGLE(
float,
2823 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) +
2827 RNA_PROPERTY_SET_SINGLE(
float,
2831 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) -
2835 RNA_PROPERTY_SET_SINGLE(
float,
2839 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) *
2843 BLI_assert_msg(0,
"Unsupported RNA override operation on float");
2851 switch (override_op) {
2865 switch (override_op) {
2870 BLI_assert_msg(0,
"Unsupported RNA override operation on pointer");
2879 switch (override_op) {
2884 BLI_assert_msg(0,
"Unsupported RNA override operation on string");
2888 if (value != buff) {
2899 if (!(is_src_idprop && is_dst_idprop)) {
2901 "'%s': Override operations on RNA collections require a specific override "
2902 "apply callback to be defined.",
2907 switch (override_op) {
2909 PointerRNA item_ptr_src, item_ptr_ref, item_ptr_dst;
2914 int item_index_src, item_index_ref;
2924 item_index_dst = item_index_ref + 1;
2963 ptr_dst, prop_dst, item_index_added, item_index_dst);
2967 BLI_assert_msg(0,
"Unsupported RNA override operation on collection");
2985# undef RNA_PROPERTY_GET_SINGLE
2986# undef RNA_PROPERTY_SET_SINGLE
2996static void rna_PrimitiveString_value_get(
PointerRNA *
ptr,
char *result)
2999 strcpy(result, data->value ? data->value :
"");
3005 return data->
value ? strlen(data->value) : 0;
3053 prop,
"rna_Struct_identifier_get",
"rna_Struct_identifier_length",
nullptr);
3060 prop,
"rna_Struct_description_get",
"rna_Struct_description_length",
nullptr);
3066 "rna_Struct_translation_context_get",
3067 "rna_Struct_translation_context_length",
3070 prop,
"Translation Context",
"Translation context of the struct's name");
3085 "Struct in which this struct is always nested, and to which it logically belongs");
3097 "rna_Struct_properties_begin",
3098 "rna_Struct_properties_next",
3099 "rna_iterator_listbase_end",
3100 "rna_Struct_properties_get",
3111 "rna_Struct_functions_begin",
3112 "rna_Struct_functions_next",
3113 "rna_iterator_listbase_end",
3114 "rna_Struct_functions_get",
3125 "rna_Struct_property_tags_begin",
3126 "rna_iterator_array_next",
3127 "rna_iterator_array_end",
3128 "rna_iterator_array_get",
3134 prop,
"Property Tags",
"Tags that properties can use to influence behavior");
3142 {0,
nullptr, 0,
nullptr,
nullptr},
3153 prop,
"rna_Property_name_get",
"rna_Property_name_length",
nullptr);
3159 prop,
"rna_Property_identifier_get",
"rna_Property_identifier_length",
nullptr);
3166 prop,
"rna_Property_description_get",
"rna_Property_description_length",
nullptr);
3172 "rna_Property_translation_context_get",
3173 "rna_Property_translation_context_length",
3176 prop,
"Translation Context",
"Translation context of the property's name");
3195 prop,
"Base",
"Struct definition used for properties assigned to this item");
3228 prop,
"Required",
"False when this property is an optional argument in an RNA function");
3235 "Optional Argument",
3236 "True when the property is optional in a Python function implementing an RNA function");
3262 prop,
"Return",
"True when this property is an output value from an RNA function");
3268 prop,
"Registered",
"Property is registered as part of type registration");
3274 "Registered Optionally",
3275 "Property is optionally registered as part of type registration");
3291 prop,
"Library Editable",
"Property is editable from linked instances (changes not saved)");
3297 prop,
"Path Output",
"Property is a filename, filepath or directory output");
3305 prop,
"Tags",
"Subset of tags (defined in parent struct) that are set for this property");
3320 prop,
"rna_Function_identifier_get",
"rna_Function_identifier_length",
nullptr);
3327 prop,
"rna_Function_description_get",
"rna_Function_description_length",
nullptr);
3334 "rna_Function_parameters_begin",
3335 "rna_iterator_listbase_next",
3336 "rna_iterator_listbase_end",
3337 "rna_iterator_listbase_get",
3348 prop,
"Registered",
"Function is registered as callback as part of type registration");
3355 "Registered Optionally",
3356 "Function is optionally registered as callback part of type registration");
3364 "Function does not pass itself as an argument (becomes a static method in Python)");
3371 "Function passes itself type as an argument (becomes a class method "
3372 "in Python if use_self is false)");
3405 prop,
"rna_NumberProperty_default_array_get_length");
3491 prop,
"Step",
"Step size used by number buttons, for floats 1/100th of the step size");
3499 "Number of digits after the dot used by buttons. Fraction is "
3500 "automatically hidden for exact integer values of fields with unit "
3501 "'NONE' or 'TIME' (frame count) and step divisible by 100.");
3512 prop,
"rna_StringProperty_default_get",
"rna_StringProperty_default_length",
nullptr);
3519 prop,
"Maximum Length",
"Maximum length of the string, 0 means unlimited");
3529 {0,
nullptr, 0,
nullptr,
nullptr},
3536 prop,
"rna_EnumProperty_default_get",
nullptr,
"rna_EnumProperty_default_itemf");
3545 prop,
"rna_EnumProperty_default_get",
nullptr,
"rna_EnumProperty_default_itemf");
3552 "rna_EnumProperty_items_begin",
3553 "rna_iterator_array_next",
3554 "rna_iterator_array_end",
3555 "rna_iterator_array_get",
3566 "rna_EnumProperty_items_begin",
3567 "rna_iterator_array_next",
3568 "rna_iterator_array_end",
3569 "rna_iterator_array_get",
3577 "Possible values for the property (never calls optional dynamic generation of those)");
3585 "rna_EnumProperty_items_ui_begin",
3586 "rna_iterator_array_next",
3587 "rna_iterator_array_end",
3588 "rna_iterator_array_get",
3595 "Static Items with UI Elements",
3596 "Possible values for the property (never calls optional dynamic generation of those). "
3597 "Includes UI elements (separators and section headings).");
3601 srna,
"Enum Item Definition",
"Definition of a choice in an RNA enum property");
3607 prop,
"rna_EnumPropertyItem_name_get",
"rna_EnumPropertyItem_name_length",
nullptr);
3613 "rna_EnumPropertyItem_description_get",
3614 "rna_EnumPropertyItem_description_length",
3621 "rna_EnumPropertyItem_identifier_get",
3622 "rna_EnumPropertyItem_identifier_length",
3648 prop,
"rna_PointerProperty_fixed_type_get",
nullptr,
nullptr,
nullptr);
3652 prop,
"rna_CollectionProperty_fixed_type_get",
nullptr,
nullptr,
nullptr);
3670 prop,
"rna_PrimitiveString_value_get",
"rna_PrimitiveString_value_length",
nullptr);
3716 "RNA floating-point number (single precision) property definition");
3729 "RNA enumeration property definition, to choose from a number of predefined options");
3735 srna,
"Pointer Definition",
"RNA pointer property to point to another RNA struct");
3741 "Collection Definition",
3742 "RNA collection property to define lists, arrays and mappings");
3757 "rna_BlenderRNA_structs_begin",
3758 "rna_iterator_listbase_next",
3759 "rna_iterator_listbase_end",
3760 "rna_iterator_listbase_get",
3768 "rna_BlenderRNA_structs_length",
3769 "rna_BlenderRNA_structs_lookup_int",
3770 "rna_BlenderRNA_structs_lookup_string",
void IDP_CopyPropertyContent(IDProperty *dst, const IDProperty *src) ATTR_NONNULL()
void BKE_lib_override_library_operations_tag(IDOverrideLibraryProperty *liboverride_property, short tag, bool do_set)
void BKE_lib_override_library_property_operation_delete(IDOverrideLibraryProperty *liboverride_property, IDOverrideLibraryPropertyOperation *liboverride_property_operation)
IDOverrideLibraryProperty * BKE_lib_override_library_property_find(IDOverrideLibrary *liboverride, const char *rna_path)
IDOverrideLibraryProperty * BKE_lib_override_library_property_get(IDOverrideLibrary *liboverride, const char *rna_path, bool *r_created)
IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_get(IDOverrideLibraryProperty *liboverride_property, short operation, const char *subitem_refname, const char *subitem_locname, const std::optional< ID * > &subitem_refid, const std::optional< ID * > &subitem_locid, int subitem_refindex, int subitem_locindex, bool strict, bool *r_strict, bool *r_created)
IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_find(IDOverrideLibraryProperty *liboverride_property, const char *subitem_refname, const char *subitem_locname, const std::optional< const ID * > &subitem_refid, const std::optional< const ID * > &subitem_locid, int subitem_refindex, int subitem_locindex, bool strict, bool *r_strict)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_kdtree_nd_ free(KDTree *tree)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define UNUSED_VARS_NDEBUG(...)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define CLOG_INFO(clg_ref, level,...)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id)
@ LIBOVERRIDE_PROP_OP_TAG_UNUSED
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE
@ LIBOVERRIDE_OP_SUBTRACT
@ LIBOVERRIDE_OP_MULTIPLY
@ LIBOVERRIDE_OP_INSERT_BEFORE
@ LIBOVERRIDE_OP_INSERT_AFTER
@ ID_TAG_LIBOVERRIDE_NEED_RESYNC
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ IDP_FLAG_OVERRIDABLE_LIBRARY
Read Guarded memory(de)allocation.
@ RNA_OVERRIDE_COMPARE_CREATE
@ RNA_OVERRIDE_MATCH_RESULT_CREATED
#define RNA_MAX_ARRAY_DIMENSION
bool(*)(CollectionPropertyIterator *iter, void *data) IteratorSkipFunc
@ STRUCT_PUBLIC_NAMESPACE
@ PROP_STRING_SEARCH_SUGGESTION
@ PROP_STRING_SEARCH_SORT
@ PROP_UNIT_TIME_ABSOLUTE
@ PROP_UNIT_COLOR_TEMPERATURE
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_LIBRARY_INSERTION
@ PROPOVERRIDE_NO_PROP_NAME
constexpr PointerRNA PointerRNA_NULL
local_group_size(16, 16) .push_constant(Type b
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
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_is_runtime(const PropertyRNA *prop)
void RNA_property_float_get_default_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
const char * RNA_property_ui_name_raw(const PropertyRNA *prop)
bool RNA_property_array_check(PropertyRNA *prop)
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
bool RNA_struct_is_ID(const StructRNA *type)
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
void rna_iterator_listbase_end(CollectionPropertyIterator *)
PropertyUnit RNA_property_unit(PropertyRNA *prop)
int RNA_property_ui_icon(const PropertyRNA *prop)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
const EnumPropertyItem * RNA_struct_property_tag_defines(const StructRNA *type)
uint RNA_enum_items_count(const EnumPropertyItem *item)
const char * RNA_property_ui_description_raw(const PropertyRNA *prop)
void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, CollectionPropertyIterator *iter)
void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
PropertyType RNA_property_type(PropertyRNA *prop)
char * RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
IDProperty * RNA_struct_idprops(PointerRNA *ptr, bool create)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_get_default_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_property_translation_context(const PropertyRNA *prop)
void RNA_property_collection_next(CollectionPropertyIterator *iter)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
void rna_iterator_listbase_next(CollectionPropertyIterator *iter)
bool RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
PointerRNA rna_pointer_inherit_refine(const PointerRNA *ptr, StructRNA *type, void *data)
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr)
bool RNA_property_collection_lookup_string_index(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr, int *r_index)
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
void RNA_property_int_get_default_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_name_property(const StructRNA *type)
void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
bool RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, int pos)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax)
int RNA_property_tags(PropertyRNA *prop)
void RNA_property_collection_end(CollectionPropertyIterator *iter)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
IDProperty * rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
void RNA_property_enum_items_ex(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const bool use_static, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
const char * RNA_property_identifier(const PropertyRNA *prop)
PropertyRNA * rna_ensure_property(PropertyRNA *prop)
int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
bool RNA_struct_equals(Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, eRNACompareMode mode)
#define RNA_PATH_BUFFSIZE
bool RNA_struct_override_matches(Main *bmain, PointerRNA *ptr_local, PointerRNA *ptr_reference, const char *root_path, const size_t root_path_len, IDOverrideLibrary *liboverride, const eRNAOverrideMatch flags, eRNAOverrideMatchResult *r_report_flags)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
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_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_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
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_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
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)
bool rna_property_override_apply_default(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx)
void rna_property_override_diff_default(Main *bmain, RNAPropertyOverrideDiffContext &rnadiff_ctx)
void rna_builtin_properties_next(CollectionPropertyIterator *iter)
void rna_builtin_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
PointerRNA rna_builtin_properties_get(CollectionPropertyIterator *iter)
PointerRNA rna_builtin_type_get(PointerRNA *ptr)
bool rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
bool rna_property_override_store_default(Main *bmain, PointerRNA *ptr_local, PointerRNA *ptr_reference, PointerRNA *ptr_storage, PropertyRNA *prop_local, PropertyRNA *prop_reference, PropertyRNA *prop_storage, int len_local, int len_reference, int len_storage, IDOverrideLibraryPropertyOperation *opop)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
void RNA_def_rna(BlenderRNA *brna)
const EnumPropertyItem rna_enum_property_type_items[]
const EnumPropertyItem rna_enum_property_override_flag_collection_items[]
static void rna_def_pointer_property(StructRNA *srna, PropertyType type)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
const EnumPropertyItem rna_enum_property_subtype_number_array_items[]
static constexpr auto PROP_HIDDEN_DESCR
static constexpr auto PROP_ENUM_FLAG_DESCR
static void rna_def_rna_primitive(BlenderRNA *brna)
static void rna_def_number_property(StructRNA *srna, PropertyType type)
static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
static void rna_def_property(BlenderRNA *brna)
const EnumPropertyItem rna_enum_property_unit_items[]
const EnumPropertyItem rna_enum_property_subtype_number_items[]
static void rna_def_string_property(StructRNA *srna)
const EnumPropertyItem rna_enum_property_string_search_flag_items[]
#define RNA_ENUM_PROPERTY_SUBTYPE_STRING_ITEMS
const EnumPropertyItem rna_enum_property_override_flag_items[]
static void rna_def_struct(BlenderRNA *brna)
static constexpr auto PROP_ANIMATABLE_DESCR
const EnumPropertyItem rna_enum_property_subtype_items[]
static constexpr auto PROP_TEXTEDIT_UPDATE_DESCR
static constexpr auto PROP_PROPORTIONAL_DESCR
const EnumPropertyItem rna_enum_property_subtype_string_items[]
static constexpr auto PROP_SKIP_PRESET_DESCR
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
#define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ARRAY_ITEMS
static const EnumPropertyItem rna_enum_property_item_library_overridable
static void rna_def_function(BlenderRNA *brna)
static constexpr auto PROP_SKIP_SAVE_DESCR
static constexpr auto PROP_PATH_OUTPUT_DESCR
const EnumPropertyItem rna_enum_property_flag_items[]
#define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ITEMS
const EnumPropertyItem rna_enum_property_flag_enum_items[]
static constexpr auto PROP_LIB_EXCEPTION_DESCR
const EnumPropertyItem rna_enum_icon_items[]
PointerRNA builtin_parent
ListBaseIterator listbase
union CollectionPropertyIterator::@1329 internal
const EnumPropertyItem * item
int subitem_reference_index
char * subitem_local_name
char * subitem_reference_name
unsigned int rna_prop_type
IDOverrideLibrary * override_library
bool is_rna_storage_idprop
RNAPropOverrideApply override_apply
unsigned int arraydimension
unsigned int totarraylength
PropertyRNA * prop_storage
IDOverrideLibraryProperty * liboverride_property
IDOverrideLibraryPropertyOperation * liboverride_operation
eRNAOverrideMatchResult report_flag
IDOverrideLibrary * liboverride
eRNAOverrideMatch liboverride_flags