27 {0,
nullptr, 0,
nullptr,
nullptr},
33 {0,
"DEFAULT", 0,
"Default",
""},
34 {0,
nullptr, 0,
nullptr,
nullptr},
48 {
PROP_ENUM,
"ENUM", 0,
"Enumeration",
""},
51 {0,
nullptr, 0,
nullptr,
nullptr},
58#define RNA_ENUM_PROPERTY_SUBTYPE_STRING_ITEMS \
59 {PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""}, \
60 {PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""}, \
61 {PROP_FILENAME, "FILE_NAME", 0, "File Name", ""}, \
62 {PROP_BYTESTRING, "BYTE_STRING", 0, "Byte String", ""}, \
63 {PROP_PASSWORD, "PASSWORD", 0, "Password", "A string that is displayed hidden ('********')"}
65#define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ITEMS \
66 {PROP_PIXEL, "PIXEL", 0, "Pixel", "A distance on screen"}, \
67 {PROP_PIXEL_DIAMETER, "PIXEL_DIAMETER", 0, "Pixel", "A distance on screen, specifically representing a diameter value"}, \
68 {PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""}, \
69 {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", "A percentage between 0 and 100"}, \
70 {PROP_FACTOR, "FACTOR", 0, "Factor", "A factor between 0.0 and 1.0"}, \
71 {PROP_ANGLE, "ANGLE", 0, "Angle", "A rotational value specified in radians"}, \
72 {PROP_TIME, "TIME", 0, "Time (Scene Relative)", \
73 "Time specified in frames, converted to seconds based on scene frame rate"}, \
74 {PROP_TIME_ABSOLUTE, "TIME_ABSOLUTE", 0, "Time (Absolute)", \
75 "Time specified in seconds, independent of the scene"}, \
76 {PROP_DISTANCE, "DISTANCE", 0, "Distance", "A distance between two points"}, \
77 {PROP_DISTANCE_DIAMETER, "DISTANCE_DIAMETER", 0, "Distance", "A distance between two points, specifically representing a diameter value"}, \
78 {PROP_DISTANCE_CAMERA, "DISTANCE_CAMERA", 0, "Camera Distance", ""}, \
79 {PROP_POWER, "POWER", 0, "Power", ""}, \
80 {PROP_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""}, \
81 {PROP_WAVELENGTH, "WAVELENGTH", 0, "Wavelength", ""}, \
82 {PROP_COLOR_TEMPERATURE, "COLOR_TEMPERATURE", 0, "Color Temperature", ""}, \
83 {PROP_FREQUENCY, "FREQUENCY", 0, "Frequency", ""}
85#define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ARRAY_ITEMS \
86 {PROP_COLOR, "COLOR", 0, "Linear Color", "Color in the scene linear working color space"}, \
87 {PROP_TRANSLATION, "TRANSLATION", 0, "Translation", ""}, \
88 {PROP_DIRECTION, "DIRECTION", 0, "Direction", ""}, \
89 {PROP_VELOCITY, "VELOCITY", 0, "Velocity", ""}, \
90 {PROP_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""}, \
91 {PROP_MATRIX, "MATRIX", 0, "Matrix", ""}, \
92 {PROP_EULER, "EULER", 0, "Euler Angles", "Euler rotation angles in radians"}, \
93 {PROP_QUATERNION, "QUATERNION", 0, "Quaternion", "Quaternion rotation (affects NLA blending)"}, \
94 {PROP_AXISANGLE, "AXISANGLE", 0, "Axis-Angle", "Angle and axis to rotate around"}, \
95 {PROP_XYZ, "XYZ", 0, "XYZ", ""}, \
96 {PROP_XYZ_LENGTH, "XYZ_LENGTH", 0, "XYZ Length", ""}, \
97 {PROP_COLOR_GAMMA, "COLOR_GAMMA", 0, "sRGB Color", "Color in sRGB color space (mainly for user interface colors)"}, \
98 {PROP_COORDS, "COORDINATES", 0, "Coordinates", ""}, \
100 {PROP_LAYER, "LAYER", 0, "Layer", ""}, \
101 {PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""}
109 {0,
nullptr, 0,
nullptr,
nullptr},
116 {0,
nullptr, 0,
nullptr,
nullptr},
123 {0,
nullptr, 0,
nullptr,
nullptr},
138 {0,
nullptr, 0,
nullptr,
nullptr},
158 {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.";
179 "This path supports relative prefix \"//\" which is expanded the directory "
180 "where the current \".blend\" file is located.";
182 "This path supports the \"{variable_name}\" template syntax, which substitutes the "
183 "value of the referenced variable in place of the template expression";
208 "Adjust values proportionally to each other",
213 "Update on every keystroke in textedit 'mode'",
217 "PATH_SUPPORTS_BLEND_RELATIVE",
219 "Relative Path Support",
222 "SUPPORTS_TEMPLATES",
224 "Variable expression support",
226 {0,
nullptr, 0,
nullptr,
nullptr},
249 {0,
nullptr, 0,
nullptr,
nullptr},
254 "LIBRARY_OVERRIDABLE",
256 "Library Overridable",
257 "Make that property editable in library overrides of linked data-blocks.\n"
258 "NOTE: For a property to be overridable, its whole chain of parent properties must also be "
259 "defined as overridable"};
263 {0,
nullptr, 0,
nullptr,
nullptr},
272 "Do not use the names of the items, only their indices in the collection"},
277 "Allow users to add new items in that collection in library overrides"},
278 {0,
nullptr, 0,
nullptr,
nullptr},
287 "Search results are suggestions (other values may be entered)"},
289 {0,
nullptr, 0,
nullptr,
nullptr},
308# include <fmt/format.h>
310static CLG_LogRef LOG_COMPARE_OVERRIDE = {
"rna.rna_compare_override"};
314static void rna_Struct_identifier_get(
PointerRNA *
ptr,
char *value)
324static void rna_Struct_description_get(
PointerRNA *
ptr,
char *value)
344static void rna_Struct_translation_context_get(
PointerRNA *
ptr,
char *value)
346 strcpy(value, ((
StructRNA *)
ptr->data)->translation_context);
349static int rna_Struct_translation_context_length(
PointerRNA *
ptr)
351 return strlen(((
StructRNA *)
ptr->data)->translation_context);
367 nullptr, &RNA_Property, ((
StructRNA *)
ptr->data)->nameproperty);
395 }
while ((ptype = ptype->
base));
451 rna_inheritance_next_level_restart(iter,
ptr, skip, 0);
458 rna_inheritance_next_level_restart(iter, &iter->
parent, skip, 0);
467 rna_inheritance_next_level_restart(iter,
ptr, skip, 1);
474 rna_inheritance_next_level_restart(iter, &iter->
parent, skip, 1);
482 if (internal->
flag) {
488 rna_inheritance_properties_listbase_next(iter, rna_property_builtin);
520 rna_inheritance_properties_listbase_begin(
521 iter,
ptr, &srna->cont.properties, rna_property_builtin);
535 rna_inheritance_functions_listbase_next(iter, rna_function_builtin);
550 rna_inheritance_functions_listbase_begin(iter,
ptr, &srna->functions, rna_function_builtin);
582 newptr.
type = &RNA_Struct;
595 rna_Struct_properties_begin(iter, &newptr);
600 rna_Struct_properties_next(iter);
605 return rna_Struct_properties_get(iter);
618 prop = lookup_prop ? *lookup_prop :
nullptr;
620 *r_ptr = {
nullptr, &RNA_Property, prop};
628 *r_ptr = {
nullptr, &RNA_Property, prop};
633 }
while ((srna = srna->
base));
652 return &RNA_BoolProperty;
654 return &RNA_IntProperty;
656 return &RNA_FloatProperty;
658 return &RNA_StringProperty;
660 return &RNA_EnumProperty;
662 return &RNA_PointerProperty;
664 return &RNA_CollectionProperty;
666 return &RNA_Property;
670static void rna_Property_identifier_get(
PointerRNA *
ptr,
char *value)
682static void rna_Property_name_get(
PointerRNA *
ptr,
char *value)
696static void rna_Property_description_get(
PointerRNA *
ptr,
char *value)
700 strcpy(value, description ? description :
"");
706 return description ? strlen(description) : 0;
709static void rna_Property_translation_context_get(
PointerRNA *
ptr,
char *value)
715static int rna_Property_translation_context_length(
PointerRNA *
ptr)
792static bool rna_Property_is_argument_optional_get(
PointerRNA *
ptr)
828static bool rna_Property_is_library_editable_flag_get(
PointerRNA *
ptr)
834static bool rna_Property_is_path_output_flag_get(
PointerRNA *
ptr)
840static bool rna_Property_is_path_supports_blend_relative_flag_get(
PointerRNA *
ptr)
846static bool rna_Property_is_path_supports_templates_flag_get(
PointerRNA *
ptr)
869 struct_tags !=
nullptr && struct_tags->
identifier !=
nullptr;
872 memcpy(&tmp, struct_tags,
sizeof(tmp));
888static void rna_Property_array_dimensions_get(
PointerRNA *
ptr,
911static bool rna_Property_is_registered_optional_get(
PointerRNA *
ptr)
929static int rna_Property_deprecated_note_length(
PointerRNA *
ptr)
933 return strlen(deprecated->note);
938static void rna_Property_deprecated_note_get(
PointerRNA *
ptr,
char *value)
942 strcpy(value, deprecated->note);
949static void rna_Property_deprecated_version_get(
PointerRNA *
ptr,
int *value)
954 version = deprecated->version;
959static void rna_Property_deprecated_removal_version_get(
PointerRNA *
ptr,
int *value)
964 version = deprecated->removal_version;
984static int rna_NumberProperty_default_array_get_length(
const PointerRNA *
ptr,
1001static void rna_IntProperty_default_array_get(
PointerRNA *
ptr,
int *values)
1011static void rna_BoolProperty_default_array_get(
PointerRNA *
ptr,
bool *values)
1021static void rna_FloatProperty_default_array_get(
PointerRNA *
ptr,
float *values)
1114static void rna_StringProperty_default_get(
PointerRNA *
ptr,
char *value)
1120static int rna_StringProperty_default_length(
PointerRNA *
ptr)
1127static int rna_StringProperty_max_length_get(
PointerRNA *
ptr)
1150 if ((eprop->
item_fn ==
nullptr) || (eprop->
item_fn == rna_EnumProperty_default_itemf) ||
1151 (
ptr->type == &RNA_EnumProperty) || (
C ==
nullptr))
1202 rna_EnumProperty_items_begin_impl(iter,
ptr, rna_enum_check_separator);
1208 rna_EnumProperty_items_begin_impl(iter,
ptr,
nullptr);
1211static void rna_EnumPropertyItem_identifier_get(
PointerRNA *
ptr,
char *value)
1216static int rna_EnumPropertyItem_identifier_length(
PointerRNA *
ptr)
1221static void rna_EnumPropertyItem_name_get(
PointerRNA *
ptr,
char *value)
1227 strcpy(value, eprop->
name);
1238 return strlen(eprop->
name);
1243static void rna_EnumPropertyItem_description_get(
PointerRNA *
ptr,
char *value)
1255static int rna_EnumPropertyItem_description_length(
PointerRNA *
ptr)
1292static void rna_Function_identifier_get(
PointerRNA *
ptr,
char *value)
1302static void rna_Function_description_get(
PointerRNA *
ptr,
char *value)
1324static bool rna_Function_registered_optional_get(
PointerRNA *
ptr)
1369 if (srna !=
nullptr) {
1377static bool rna_BlenderRNA_structs_lookup_string(
PointerRNA *
ptr,
1383 if (srna !=
nullptr) {
1397struct RNACompareOverrideDiffPropPtrContext {
1399 RNAPropertyOverrideDiffContext &rnadiff_ctx;
1402 ID *owner_id_a =
nullptr;
1403 ID *owner_id_b =
nullptr;
1404 PointerRNA propptr_a = {};
1405 PointerRNA propptr_b = {};
1412 bool no_ownership =
false;
1417 bool no_prop_name =
false;
1420 bool do_force_name =
false;
1422 bool use_id_pointer =
false;
1433 bool has_liboverride_apply_cb =
false;
1439 std::optional<std::string> rna_itemname_a;
1440 std::optional<std::string> rna_itemname_b;
1441 std::optional<ID *> rna_itemid_a;
1442 std::optional<ID *> rna_itemid_b;
1443 int rna_itemindex_a = -1;
1444 int rna_itemindex_b = -1;
1453 bool is_valid_for_diffing =
true;
1456 bool is_null =
false;
1457 bool is_type_diff =
false;
1459 RNACompareOverrideDiffPropPtrContext(RNAPropertyOverrideDiffContext &rnadiff_ctx_)
1460 : rnadiff_ctx(rnadiff_ctx_)
1464static void rna_property_override_diff_propptr_validate_diffing(
1465 RNACompareOverrideDiffPropPtrContext &ptrdiff_ctx)
1467 PointerRNA *propptr_a = &ptrdiff_ctx.propptr_a;
1468 PointerRNA *propptr_b = &ptrdiff_ctx.propptr_b;
1469 const bool no_ownership = ptrdiff_ctx.no_ownership;
1470 const bool no_prop_name = ptrdiff_ctx.no_prop_name;
1471 const bool do_force_name = ptrdiff_ctx.do_force_name;
1473 ptrdiff_ctx.is_valid_for_diffing =
true;
1477 if (do_force_name || ptrdiff_ctx.use_id_pointer) {
1483 if (
ELEM(
nullptr, propptr_b, propptr_b->
type, propptr_b->
data)) {
1484 ptrdiff_ctx.is_null =
true;
1488 ptrdiff_ctx.is_null =
true;
1489 ptrdiff_ctx.is_type_diff = propptr_a->
type != propptr_b->
type;
1491 ptrdiff_ctx.is_valid_for_diffing =
false;
1495 ptrdiff_ctx.is_null = (
ELEM(
nullptr, propptr_b, propptr_b->
type, propptr_b->
data));
1496 ptrdiff_ctx.is_type_diff = (propptr_b ==
nullptr || propptr_b->
type != propptr_a->
type);
1497 ptrdiff_ctx.is_valid_for_diffing = !((ptrdiff_ctx.is_id && no_ownership) ||
1498 ptrdiff_ctx.is_null || ptrdiff_ctx.is_type_diff);
1505 if (!no_prop_name && (ptrdiff_ctx.is_valid_for_diffing || do_force_name)) {
1509 PropertyRNA *nameprop_b = (propptr_b !=
nullptr && propptr_b->
type !=
nullptr) ?
1512 const bool do_id_pointer = ptrdiff_ctx.use_id_pointer && ptrdiff_ctx.is_id;
1518 int rna_itemname_a_len = 0, rna_itemname_b_len = 0;
1519 char *rna_itemname_a =
nullptr;
1520 char *rna_itemname_b =
nullptr;
1523 if (nameprop_a !=
nullptr) {
1525 propptr_a, nameprop_a, buff_a,
sizeof(buff_a), &rna_itemname_a_len);
1527 ptrdiff_ctx.rna_itemname_a = rna_itemname_a;
1530 if (nameprop_b !=
nullptr) {
1532 propptr_b, nameprop_b, buff_b,
sizeof(buff_b), &rna_itemname_b_len);
1533 ptrdiff_ctx.rna_itemname_b = rna_itemname_b;
1539 ID *rna_itemid_a = (do_id_pointer && propptr_a->
data) ?
static_cast<ID *
>(propptr_a->
data) :
1541 ID *rna_itemid_b = (do_id_pointer && propptr_b->
data) ?
static_cast<ID *
>(propptr_b->
data) :
1543 if (do_id_pointer) {
1544 ptrdiff_ctx.rna_itemid_a = rna_itemid_a;
1545 ptrdiff_ctx.rna_itemid_b = rna_itemid_b;
1548 if (rna_itemname_a !=
nullptr && rna_itemname_b !=
nullptr) {
1549 if (rna_itemid_a != rna_itemid_b || rna_itemname_a_len != rna_itemname_b_len ||
1550 rna_itemname_a[0] != rna_itemname_b[0] || !
STREQ(rna_itemname_a, rna_itemname_b))
1552 ptrdiff_ctx.is_valid_for_diffing =
false;
1556 if (
UNLIKELY(rna_itemname_a && rna_itemname_a != buff_a)) {
1559 if (
UNLIKELY(rna_itemname_b && rna_itemname_b != buff_b)) {
1564 if (ptrdiff_ctx.is_id) {
1570static void rna_property_override_diff_propptr(
Main *bmain,
1571 RNACompareOverrideDiffPropPtrContext &ptrdiff_ctx)
1573 ID *owner_id_a = ptrdiff_ctx.owner_id_a;
1574 ID *owner_id_b = ptrdiff_ctx.owner_id_b;
1575 PointerRNA *propptr_a = &ptrdiff_ctx.propptr_a;
1576 PointerRNA *propptr_b = &ptrdiff_ctx.propptr_b;
1579 const bool no_ownership = ptrdiff_ctx.no_ownership;
1582 const eRNAOverrideMatch liboverride_flags = ptrdiff_ctx.rnadiff_ctx.liboverride_flags;
1583 const char *rna_path = ptrdiff_ctx.rnadiff_ctx.rna_path;
1584 size_t rna_path_len = ptrdiff_ctx.rnadiff_ctx.rna_path_len;
1585 const PropertyType property_type = ptrdiff_ctx.property_type;
1587 std::optional<std::string> &rna_itemname_a = ptrdiff_ctx.rna_itemname_a;
1588 std::optional<std::string> &rna_itemname_b = ptrdiff_ctx.rna_itemname_b;
1589 const int rna_itemindex_a = ptrdiff_ctx.rna_itemindex_a;
1590 const int rna_itemindex_b = ptrdiff_ctx.rna_itemindex_b;
1594 rna_property_override_diff_propptr_validate_diffing(ptrdiff_ctx);
1598 const bool is_valid_for_diffing = ptrdiff_ctx.is_valid_for_diffing;
1599 const bool is_id = ptrdiff_ctx.is_id;
1600 const bool is_null = ptrdiff_ctx.is_null;
1601 const bool is_type_diff = ptrdiff_ctx.is_type_diff;
1603 const bool has_liboverride_apply_cb = ptrdiff_ctx.has_liboverride_apply_cb;
1604 const bool do_create = (liboverride !=
nullptr &&
1607 (is_id || has_liboverride_apply_cb) &&
1609 rna_path !=
nullptr);
1627 if (no_ownership || is_null || is_type_diff || !is_valid_for_diffing) {
1631 ptrdiff_ctx.rnadiff_ctx.comparison = (propptr_a->
data != propptr_b->
data);
1633 if (do_create && ptrdiff_ctx.rnadiff_ctx.comparison != 0) {
1634 bool created =
false;
1636 liboverride, rna_path, &created);
1639 if (op !=
nullptr) {
1648 if (created || (rna_itemname_a && !rna_itemname_a->empty()) ||
1649 (rna_itemname_b && !rna_itemname_b->empty()) || rna_itemindex_a != -1 ||
1650 rna_itemindex_b != -1)
1652 const char *subitem_refname = rna_itemname_b ? rna_itemname_b->c_str() :
nullptr;
1653 const char *subitem_locname = rna_itemname_a ? rna_itemname_a->c_str() :
nullptr;
1658 ptrdiff_ctx.rna_itemid_b,
1659 ptrdiff_ctx.rna_itemid_a,
1677 if (is_id && no_ownership) {
1678 if (opop ==
nullptr) {
1679 const char *subitem_refname = rna_itemname_b ? rna_itemname_b->c_str() :
nullptr;
1680 const char *subitem_locname = rna_itemname_a ? rna_itemname_a->c_str() :
nullptr;
1685 ptrdiff_ctx.rna_itemid_b,
1686 ptrdiff_ctx.rna_itemid_a,
1703 ID *id_a =
static_cast<ID *
>(propptr_a->
data);
1704 ID *id_b =
static_cast<ID *
>(propptr_b->
data);
1705 if (
ELEM(
nullptr, id_a, id_b)) {
1717 &LOG_COMPARE_OVERRIDE,
1718 "Not checking matching ID pointer properties, since owner %s is tagged as "
1719 "needing resync.\n",
1742# define RNA_PATH_BUFFSIZE 8192
1745 char *extended_rna_path = extended_rna_path_buffer;
1746 size_t extended_rna_path_len = 0;
1752 if ((rna_itemname_a && !rna_itemname_a->empty()) &&
1753 (rna_itemname_b && !rna_itemname_b->empty()))
1755 BLI_assert(*rna_itemname_a == *rna_itemname_b);
1759 esc_item_name, rna_itemname_a->c_str(),
sizeof(esc_item_name));
1760 extended_rna_path_len = rna_path_len + 2 + esc_item_name_len + 2;
1765 memcpy(extended_rna_path, rna_path, rna_path_len);
1766 extended_rna_path[rna_path_len] =
'[';
1767 extended_rna_path[rna_path_len + 1] =
'"';
1768 memcpy(extended_rna_path + rna_path_len + 2, esc_item_name, esc_item_name_len);
1769 extended_rna_path[rna_path_len + 2 + esc_item_name_len] =
'"';
1770 extended_rna_path[rna_path_len + 2 + esc_item_name_len + 1] =
']';
1771 extended_rna_path[extended_rna_path_len] =
'\0';
1773 else if (rna_itemindex_a != -1) {
1774 BLI_assert(rna_itemindex_a == rna_itemindex_b);
1777 char item_index_buff[32];
1778 size_t item_index_buff_len = 0;
1779 if (rna_itemindex_a == 0) {
1780 item_index_buff[0] =
'0';
1781 item_index_buff_len = 1;
1785 for (index = rna_itemindex_a;
1786 index > 0 && item_index_buff_len <
sizeof(item_index_buff);
1789 item_index_buff[item_index_buff_len++] =
'0' + char(index % 10);
1794 extended_rna_path_len = rna_path_len + item_index_buff_len + 2;
1799 memcpy(extended_rna_path, rna_path, rna_path_len);
1800 extended_rna_path[rna_path_len] =
'[';
1801 for (
size_t i = 1;
i <= item_index_buff_len;
i++) {
1804 extended_rna_path[rna_path_len +
i] = item_index_buff[item_index_buff_len -
i];
1806 extended_rna_path[rna_path_len + 1 + item_index_buff_len] =
']';
1807 extended_rna_path[extended_rna_path_len] =
'\0';
1810 extended_rna_path = (
char *)rna_path;
1811 extended_rna_path_len = rna_path_len;
1819 extended_rna_path_len,
1822 &ptrdiff_ctx.rnadiff_ctx.report_flag);
1823 ptrdiff_ctx.rnadiff_ctx.comparison = !match;
1833 if (op !=
nullptr) {
1837 if (!
ELEM(extended_rna_path, extended_rna_path_buffer, rna_path)) {
1841# undef RNA_PATH_BUFFSIZE
1845 if (no_ownership || is_null || is_type_diff || !is_valid_for_diffing) {
1849 ptrdiff_ctx.rnadiff_ctx.comparison = (propptr_a->
data != propptr_b->
data);
1854 ptrdiff_ctx.rnadiff_ctx.comparison = !
RNA_struct_equals(bmain, propptr_a, propptr_b, mode);
1859# define RNA_PROPERTY_GET_SINGLE(_typename, _ptr, _prop, _index) \
1860 (is_array ? RNA_property_##_typename##_get_index((_ptr), (_prop), (_index)) : \
1861 RNA_property_##_typename##_get((_ptr), (_prop)))
1862# define RNA_PROPERTY_SET_SINGLE(_typename, _ptr, _prop, _index, _value) \
1863 (is_array ? RNA_property_##_typename##_set_index((_ptr), (_prop), (_index), (_value)) : \
1864 RNA_property_##_typename##_set((_ptr), (_prop), (_value)))
1883 const char *rna_path = rnadiff_ctx.
rna_path;
1891 const bool do_create = liboverride !=
nullptr &&
1893 rna_path !=
nullptr;
1898 bool created =
false;
1901 switch (rna_prop_type) {
1905 bool *array_a, *array_b;
1917 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
bool) * len_a);
1919 if (do_create && rnadiff_ctx.
comparison != 0) {
1923 if (op !=
nullptr && created) {
1942 if (array_a != array_stack_a) {
1945 if (array_b != array_stack_b) {
1952 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
1954 if (do_create && rnadiff_ctx.
comparison != 0) {
1955 op = BKE_lib_override_library_property_get(liboverride, rna_path, &created);
1957 if (op != nullptr && created) {
1958 BKE_lib_override_library_property_operation_get(op,
1959 LIBOVERRIDE_OP_REPLACE,
1969 rnadiff_ctx.report_flag |= RNA_OVERRIDE_MATCH_RESULT_CREATED;
1979 int *array_a, *array_b;
1989 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
int) * len_a);
1991 if (do_create && rnadiff_ctx.
comparison != 0) {
1995 if (op !=
nullptr && created) {
2016 if (array_a != array_stack_a) {
2019 if (array_b != array_stack_b) {
2026 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
2028 if (do_create && rnadiff_ctx.
comparison != 0) {
2029 op = BKE_lib_override_library_property_get(liboverride, rna_path, &created);
2031 if (op != nullptr && created) {
2032 BKE_lib_override_library_property_operation_get(op,
2033 LIBOVERRIDE_OP_REPLACE,
2043 rnadiff_ctx.report_flag |= RNA_OVERRIDE_MATCH_RESULT_CREATED;
2053 float *array_a, *array_b;
2065 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
float) * len_a);
2067 if (do_create && rnadiff_ctx.
comparison != 0) {
2071 if (op !=
nullptr && created) {
2090 if (array_a != array_stack_a) {
2093 if (array_b != array_stack_b) {
2100 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
2102 if (do_create && rnadiff_ctx.
comparison != 0) {
2103 op = BKE_lib_override_library_property_get(liboverride, rna_path, &created);
2105 if (op != nullptr && created) {
2106 BKE_lib_override_library_property_operation_get(op,
2107 LIBOVERRIDE_OP_REPLACE,
2117 rnadiff_ctx.report_flag |= RNA_OVERRIDE_MATCH_RESULT_CREATED;
2129 if (do_create && rnadiff_ctx.
comparison != 0) {
2132 if (op !=
nullptr && created) {
2151 char fixed_a[4096], fixed_b[4096];
2152 int len_str_a, len_str_b;
2154 ptr_a, rawprop_a, fixed_a,
sizeof(fixed_a), &len_str_a);
2156 ptr_b, rawprop_b, fixed_b,
sizeof(fixed_b), &len_str_b);
2161 rnadiff_ctx.
comparison = len_str_a < len_str_b ? -1 :
2162 len_str_a > len_str_b ? 1 :
2163 strcmp(value_a, value_b);
2165 rnadiff_ctx.
comparison = strcmp(value_a, value_b);
2167 if (do_create && rnadiff_ctx.
comparison != 0) {
2170 if (op !=
nullptr && created) {
2186 if (value_a != fixed_a) {
2189 if (value_b != fixed_b) {
2205 RNACompareOverrideDiffPropPtrContext ptrdiff_ctx(rnadiff_ctx);
2206 ptrdiff_ctx.owner_id_a = ptr_a->
owner_id;
2207 ptrdiff_ctx.owner_id_b = ptr_b->
owner_id;
2213 ptrdiff_ctx.no_prop_name =
true;
2214 ptrdiff_ctx.no_ownership = no_ownership;
2223 ptrdiff_ctx.has_liboverride_apply_cb =
true;
2225 rna_property_override_diff_propptr(bmain, ptrdiff_ctx);
2240 if (!has_liboverride_apply_cb &&
2244 "RNA collection '%s' defined as supporting liboverride insertion of items, but "
2245 "no liboverride apply callback defined for it. No insertion will happen.",
2251 const bool use_collection_insertion = has_liboverride_apply_cb && do_create &&
2259 std::optional<std::string> prev_rna_itemname_a;
2260 std::optional<ID *> prev_rna_itemid_a;
2266 if (use_collection_insertion) {
2270 if (op !=
nullptr) {
2280 for (; iter_a.
valid && !abort;) {
2282 bool is_valid_for_insertion = use_collection_insertion;
2284 RNACompareOverrideDiffPropPtrContext ptrdiff_ctx(rnadiff_ctx);
2285 ptrdiff_ctx.owner_id_a = ptr_a->
owner_id;
2286 ptrdiff_ctx.owner_id_b = ptr_b->
owner_id;
2287 ptrdiff_ctx.propptr_a = iter_a.
ptr;
2289 ptrdiff_ctx.propptr_b = iter_b.
ptr;
2291 ptrdiff_ctx.no_prop_name = no_prop_name;
2292 ptrdiff_ctx.do_force_name = !no_prop_name;
2293 ptrdiff_ctx.use_id_pointer = !no_prop_name;
2294 ptrdiff_ctx.no_ownership = no_ownership;
2296 ptrdiff_ctx.has_liboverride_apply_cb = has_liboverride_apply_cb;
2298 if (iter_b.
valid || use_collection_insertion) {
2299 rna_property_override_diff_propptr_validate_diffing(ptrdiff_ctx);
2302 ptrdiff_ctx.no_prop_name =
true;
2303 ptrdiff_ctx.do_force_name =
false;
2304 ptrdiff_ctx.use_id_pointer =
false;
2307 const bool is_valid_for_diffing = ptrdiff_ctx.is_valid_for_diffing;
2308 const bool is_id = ptrdiff_ctx.is_id;
2311 if (is_id || is_valid_for_diffing) {
2312 is_valid_for_insertion =
false;
2318 "Checking %s, %s [%d] vs %s [%d]; is_id: %d, diffing: %d; "
2319 "insert: %d (could be used: %d, do_create: %d)\n",
2321 ptrdiff_ctx.rna_itemname_a ? ptrdiff_ctx.rna_itemname_a->c_str() :
"",
2323 ptrdiff_ctx.rna_itemname_b ? ptrdiff_ctx.rna_itemname_b->c_str() :
"",
2326 is_valid_for_diffing,
2327 is_valid_for_insertion,
2328 use_collection_insertion,
2333 if (!(is_id || is_valid_for_diffing || is_valid_for_insertion)) {
2348 if (is_valid_for_insertion && use_collection_insertion) {
2354 (no_prop_name || !prev_rna_itemname_a) ?
nullptr : prev_rna_itemname_a->c_str(),
2355 (no_prop_name || !ptrdiff_ctx.rna_itemname_a) ?
2357 ptrdiff_ctx.rna_itemname_a->c_str(),
2359 ptrdiff_ctx.rna_itemid_a,
2366 printf(
"%s: Adding insertion op override after '%s'/%d\n",
2368 prev_rna_itemname_a ? prev_rna_itemname_a->c_str() :
"",
2375 else if (is_id || is_valid_for_diffing) {
2376 if (equals || do_create) {
2377 ptrdiff_ctx.rna_itemindex_a = idx_a;
2378 ptrdiff_ctx.rna_itemindex_b = idx_b;
2379 rna_property_override_diff_propptr(bmain, ptrdiff_ctx);
2380 equals = equals && (rnadiff_ctx.
comparison == 0);
2384 if (ptrdiff_ctx.rna_itemname_a) {
2385 prev_rna_itemname_a = std::move(*ptrdiff_ctx.rna_itemname_a);
2388 prev_rna_itemname_a.reset();
2390 prev_rna_itemid_a = ptrdiff_ctx.rna_itemid_a;
2392 if (!do_create && !equals) {
2397 if (!(use_collection_insertion && !(is_id || is_valid_for_diffing))) {
2405 }
while (iter_a.
valid);
2418 equals = equals && !(iter_a.
valid || iter_b.
valid) && !abort;
2430 if (op !=
nullptr) {
2448 const int len_local,
2449 const int len_reference,
2450 const int len_storage,
2453 BLI_assert(len_local == len_reference && (!ptr_storage || len_local == len_storage));
2456 bool changed =
false;
2457 const bool is_array = len_local > 0;
2475 BLI_assert_msg(0,
"Boolean properties support no override diff operation");
2478 int prop_min, prop_max;
2481 if (is_array && index == -1) {
2483 int *array_a, *array_b;
2501 for (
int i = len_local;
i--;) {
2502 array_b[
i] = fac * (array_b[
i] - array_a[
i]);
2503 if (array_b[
i] < prop_min || array_b[
i] > prop_max) {
2505 for (
int j = len_local; j--;) {
2506 array_b[j] = j >=
i ? -array_b[j] : fac * (array_a[j] - array_b[j]);
2507 if (array_b[j] < prop_min || array_b[j] > prop_max) {
2522 if (array_b != array_stack_b) {
2528 BLI_assert_msg(0,
"Unsupported RNA override diff operation on integer");
2532 if (array_a != array_stack_a) {
2537 const int value = RNA_PROPERTY_GET_SINGLE(
int, ptr_reference, prop_reference, index);
2545 int b = fac * (RNA_PROPERTY_GET_SINGLE(
int, ptr_local, prop_local, index) - value);
2555 RNA_PROPERTY_SET_SINGLE(
int, ptr_storage, prop_storage, index,
b);
2559 BLI_assert_msg(0,
"Unsupported RNA override diff operation on integer");
2566 float prop_min, prop_max;
2569 if (is_array && index == -1) {
2571 float *array_a, *array_b;
2589 for (
int i = len_local;
i--;) {
2590 array_b[
i] = fac * (array_b[
i] - array_a[
i]);
2591 if (array_b[
i] < prop_min || array_b[
i] > prop_max) {
2593 for (
int j = len_local; j--;) {
2594 array_b[j] = j >=
i ? -array_b[j] : fac * (array_a[j] - array_b[j]);
2595 if (array_b[j] < prop_min || array_b[j] > prop_max) {
2610 if (array_b != array_stack_b) {
2621 for (
int i = len_local;
i--;) {
2622 array_b[
i] = array_a[
i] == 0.0f ? array_b[
i] : array_b[
i] / array_a[
i];
2623 if (array_b[
i] < prop_min || array_b[
i] > prop_max) {
2633 if (array_b != array_stack_b) {
2639 BLI_assert_msg(0,
"Unsupported RNA override diff operation on float");
2643 if (array_a != array_stack_a) {
2648 const float value = RNA_PROPERTY_GET_SINGLE(
float, ptr_reference, prop_reference, index);
2656 float b = fac * (RNA_PROPERTY_GET_SINGLE(
float, ptr_local, prop_local, index) - value);
2666 RNA_PROPERTY_SET_SINGLE(
float, ptr_storage, prop_storage, index,
b);
2671 (value == 0.0f ? 1.0f : value);
2681 BLI_assert_msg(0,
"Unsupported RNA override diff operation on float");
2689 BLI_assert_msg(0,
"Enum properties support no override diff operation");
2692 BLI_assert_msg(0,
"Pointer properties support no override diff operation");
2695 BLI_assert_msg(0,
"String properties support no override diff operation");
2699 BLI_assert_msg(0,
"Collection properties support no override diff operation");
2717 const int len_dst = rnaapply_ctx.
len_src;
2718 const int len_src = rnaapply_ctx.
len_src;
2727 if (prop_src_type != prop_dst_type ||
2734 "%s.%s: Inconsistency between stored property type (%d) and linked reference one "
2735 "(%d), skipping liboverride apply",
2737 prop_rna_path ? prop_rna_path->c_str() :
2738 fmt::format(
" ... .{}", prop_dst->
name).c_str(),
2748 BLI_assert(len_dst == len_src && (!prop_storage || len_dst == len_storage));
2751 const bool is_array = len_dst > 0;
2753 const short override_op = opop->
operation;
2755 bool ret_success =
true;
2759 if (is_array && index == -1) {
2769 switch (override_op) {
2774 BLI_assert_msg(0,
"Unsupported RNA override operation on boolean");
2778 if (array_a != array_stack_a) {
2783 const bool value = RNA_PROPERTY_GET_SINGLE(
boolean, ptr_src, prop_src, index);
2785 switch (override_op) {
2787 RNA_PROPERTY_SET_SINGLE(
boolean, ptr_dst, prop_dst, index, value);
2790 BLI_assert_msg(0,
"Unsupported RNA override operation on boolean");
2796 if (is_array && index == -1) {
2798 int *array_a, *array_b;
2803 switch (override_op) {
2816 for (
int i = len_dst;
i--;) {
2817 array_a[
i] += array_b[
i];
2821 for (
int i = len_dst;
i--;) {
2822 array_a[
i] -= array_b[
i];
2826 if (array_b != array_stack_b) {
2831 BLI_assert_msg(0,
"Unsupported RNA override operation on integer");
2835 if (array_a != array_stack_a) {
2840 const int storage_value = prop_storage ? RNA_PROPERTY_GET_SINGLE(
2841 int, ptr_storage, prop_storage, index) :
2844 switch (override_op) {
2846 RNA_PROPERTY_SET_SINGLE(
int,
2850 RNA_PROPERTY_GET_SINGLE(
int, ptr_src, prop_src, index));
2853 RNA_PROPERTY_SET_SINGLE(
int,
2857 RNA_PROPERTY_GET_SINGLE(
int, ptr_dst, prop_dst, index) -
2861 RNA_PROPERTY_SET_SINGLE(
int,
2865 RNA_PROPERTY_GET_SINGLE(
int, ptr_dst, prop_dst, index) -
2869 BLI_assert_msg(0,
"Unsupported RNA override operation on integer");
2875 if (is_array && index == -1) {
2877 float *array_a, *array_b;
2883 switch (override_op) {
2897 for (
int i = len_dst;
i--;) {
2898 array_a[
i] += array_b[
i];
2902 for (
int i = len_dst;
i--;) {
2903 array_a[
i] -= array_b[
i];
2907 for (
int i = len_dst;
i--;) {
2908 array_a[
i] *= array_b[
i];
2912 if (array_b != array_stack_b) {
2917 BLI_assert_msg(0,
"Unsupported RNA override operation on float");
2921 if (array_a != array_stack_a) {
2926 const float storage_value = prop_storage ? RNA_PROPERTY_GET_SINGLE(
2927 float, ptr_storage, prop_storage, index) :
2930 switch (override_op) {
2932 RNA_PROPERTY_SET_SINGLE(
float,
2936 RNA_PROPERTY_GET_SINGLE(
float, ptr_src, prop_src, index));
2939 RNA_PROPERTY_SET_SINGLE(
float,
2943 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) +
2947 RNA_PROPERTY_SET_SINGLE(
float,
2951 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) -
2955 RNA_PROPERTY_SET_SINGLE(
float,
2959 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) *
2963 BLI_assert_msg(0,
"Unsupported RNA override operation on float");
2971 switch (override_op) {
2985 switch (override_op) {
2990 BLI_assert_msg(0,
"Unsupported RNA override operation on pointer");
2999 switch (override_op) {
3004 BLI_assert_msg(0,
"Unsupported RNA override operation on string");
3008 if (value != buff) {
3019 if (!(is_src_idprop && is_dst_idprop)) {
3021 "'%s': Override operations on RNA collections require a specific override "
3022 "apply callback to be defined.",
3027 switch (override_op) {
3029 PointerRNA item_ptr_src, item_ptr_ref, item_ptr_dst;
3031 bool is_valid =
false;
3034 int item_index_src, item_index_ref;
3044 item_index_dst = item_index_ref + 1;
3083 ptr_dst, prop_dst, item_index_added, item_index_dst);
3087 BLI_assert_msg(0,
"Unsupported RNA override operation on collection");
3105# undef RNA_PROPERTY_GET_SINGLE
3106# undef RNA_PROPERTY_SET_SINGLE
3125 return data->value ? strlen(
data->value) : 0;
3173 prop,
"rna_Struct_identifier_get",
"rna_Struct_identifier_length",
nullptr);
3180 prop,
"rna_Struct_description_get",
"rna_Struct_description_length",
nullptr);
3186 "rna_Struct_translation_context_get",
3187 "rna_Struct_translation_context_length",
3190 prop,
"Translation Context",
"Translation context of the struct's name");
3205 "Struct in which this struct is always nested, and to which it logically belongs");
3217 "rna_Struct_properties_begin",
3218 "rna_Struct_properties_next",
3219 "rna_iterator_listbase_end",
3220 "rna_Struct_properties_get",
3231 "rna_Struct_functions_begin",
3232 "rna_Struct_functions_next",
3233 "rna_iterator_listbase_end",
3234 "rna_Struct_functions_get",
3245 "rna_Struct_property_tags_begin",
3246 "rna_iterator_array_next",
3247 "rna_iterator_array_end",
3248 "rna_iterator_array_get",
3254 prop,
"Property Tags",
"Tags that properties can use to influence behavior");
3262 {0,
nullptr, 0,
nullptr,
nullptr},
3273 prop,
"rna_Property_name_get",
"rna_Property_name_length",
nullptr);
3279 prop,
"rna_Property_identifier_get",
"rna_Property_identifier_length",
nullptr);
3286 prop,
"rna_Property_description_get",
"rna_Property_description_length",
nullptr);
3292 "rna_Property_translation_context_get",
3293 "rna_Property_translation_context_length",
3296 prop,
"Translation Context",
"Translation context of the property's name");
3316 prop,
"Base",
"Struct definition used for properties assigned to this item");
3350 prop,
"Required",
"False when this property is an optional argument in an RNA function");
3357 "Optional Argument",
3358 "True when the property is optional in a Python function implementing an RNA function");
3384 prop,
"Return",
"True when this property is an output value from an RNA function");
3390 prop,
"Registered",
"Property is registered as part of type registration");
3396 "Registered Optionally",
3397 "Property is optionally registered as part of type registration");
3413 prop,
"Library Editable",
"Property is editable from linked instances (changes not saved)");
3419 prop,
"Path Output",
"Property is a filename, filepath or directory output");
3424 prop,
"rna_Property_is_path_supports_blend_relative_flag_get",
nullptr);
3428 "Property is a path which supports the \"//\" prefix, "
3429 "signifying the location as relative to the \".blend\" file's directory");
3434 prop,
"rna_Property_is_path_supports_templates_flag_get",
nullptr);
3437 "Variable Expression Support",
3438 "Property is a path which supports the \"{variable_name}\" variable expression syntax, "
3439 "which substitutes the value of the referenced variable in place of the expression");
3449 prop,
"rna_Property_deprecated_note_get",
"rna_Property_deprecated_note_length",
nullptr);
3463 prop,
"Deprecated Removal Version",
"The Blender version this is expected to be removed");
3465 prop,
"rna_Property_deprecated_removal_version_get",
nullptr,
nullptr);
3473 prop,
"Tags",
"Subset of tags (defined in parent struct) that are set for this property");
3488 prop,
"rna_Function_identifier_get",
"rna_Function_identifier_length",
nullptr);
3495 prop,
"rna_Function_description_get",
"rna_Function_description_length",
nullptr);
3502 "rna_Function_parameters_begin",
3503 "rna_iterator_listbase_next",
3504 "rna_iterator_listbase_end",
3505 "rna_iterator_listbase_get",
3516 prop,
"Registered",
"Function is registered as callback as part of type registration");
3523 "Registered Optionally",
3524 "Function is optionally registered as callback part of type registration");
3532 "Function does not pass itself as an argument (becomes a static method in Python)");
3539 "Function passes itself type as an argument (becomes a class method "
3540 "in Python if use_self is false)");
3573 prop,
"rna_NumberProperty_default_array_get_length");
3659 prop,
"Step",
"Step size used by number buttons, for floats 1/100th of the step size");
3667 "Number of digits after the dot used by buttons. Fraction is "
3668 "automatically hidden for exact integer values of fields with unit "
3669 "'NONE' or 'TIME' (frame count) and step divisible by 100.");
3680 prop,
"rna_StringProperty_default_get",
"rna_StringProperty_default_length",
nullptr);
3687 prop,
"Maximum Length",
"Maximum length of the string, 0 means unlimited");
3698 prop,
"rna_EnumProperty_default_get",
nullptr,
"rna_EnumProperty_default_itemf");
3707 prop,
"rna_EnumProperty_default_get",
nullptr,
"rna_EnumProperty_default_itemf");
3714 "rna_EnumProperty_items_begin",
3715 "rna_iterator_array_next",
3716 "rna_iterator_array_end",
3717 "rna_iterator_array_get",
3728 "rna_EnumProperty_items_begin",
3729 "rna_iterator_array_next",
3730 "rna_iterator_array_end",
3731 "rna_iterator_array_get",
3739 "Possible values for the property (never calls optional dynamic generation of those)");
3747 "rna_EnumProperty_items_ui_begin",
3748 "rna_iterator_array_next",
3749 "rna_iterator_array_end",
3750 "rna_iterator_array_get",
3757 "Static Items with UI Elements",
3758 "Possible values for the property (never calls optional dynamic generation of those). "
3759 "Includes UI elements (separators and section headings).");
3763 srna,
"Enum Item Definition",
"Definition of a choice in an RNA enum property");
3769 prop,
"rna_EnumPropertyItem_name_get",
"rna_EnumPropertyItem_name_length",
nullptr);
3775 "rna_EnumPropertyItem_description_get",
3776 "rna_EnumPropertyItem_description_length",
3783 "rna_EnumPropertyItem_identifier_get",
3784 "rna_EnumPropertyItem_identifier_length",
3810 prop,
"rna_PointerProperty_fixed_type_get",
nullptr,
nullptr,
nullptr);
3814 prop,
"rna_CollectionProperty_fixed_type_get",
nullptr,
nullptr,
nullptr);
3832 prop,
"rna_PrimitiveString_value_get",
"rna_PrimitiveString_value_length",
nullptr);
3878 "RNA floating-point number (single precision) property definition");
3891 "RNA enumeration property definition, to choose from a number of predefined options");
3897 srna,
"Pointer Definition",
"RNA pointer property to point to another RNA struct");
3903 "Collection Definition",
3904 "RNA collection property to define lists, arrays and mappings");
3919 "rna_BlenderRNA_structs_begin",
3920 "rna_iterator_listbase_next",
3921 "rna_iterator_listbase_end",
3922 "rna_iterator_listbase_get",
3930 "rna_BlenderRNA_structs_length",
3931 "rna_BlenderRNA_structs_lookup_int",
3932 "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)
#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)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
int BLI_listbase_count(const 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 ARRAY_SET_ITEMS(...)
#define UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_UNIT
#define CLOG_ERROR(clg_ref,...)
#define CLOG_DEBUG(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id)
@ ID_TAG_LIBOVERRIDE_NEED_RESYNC
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE
@ LIBOVERRIDE_PROP_OP_TAG_UNUSED
@ LIBOVERRIDE_OP_SUBTRACT
@ LIBOVERRIDE_OP_MULTIPLY
@ LIBOVERRIDE_OP_INSERT_BEFORE
@ LIBOVERRIDE_OP_INSERT_AFTER
#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
@ PARM_PYFUNC_REGISTER_OPTIONAL
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
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
@ PROP_PATH_SUPPORTS_TEMPLATES
BMesh const char void * data
float length(VecOp< float, D >) RET
void * MEM_malloc_arrayN(size_t len, size_t size, 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)
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)
const PointerRNA PointerRNA_NULL
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)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_get_default_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_property_translation_context(const PropertyRNA *prop)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, ListBase *lb, IteratorSkipFunc skip)
void RNA_property_collection_next(CollectionPropertyIterator *iter)
void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
const DeprecatedRNA * RNA_property_deprecated(const PropertyRNA *prop)
void rna_iterator_listbase_next(CollectionPropertyIterator *iter)
bool RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
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)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, size_t itemsize, int64_t length, bool free_ptr, IteratorSkipFunc skip)
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)
const char * RNA_property_ui_name_raw(const PropertyRNA *prop, const PointerRNA *ptr)
PointerRNA RNA_pointer_create_discrete(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)
PointerRNA RNA_property_pointer_get_never_create(PointerRNA *ptr, PropertyRNA *prop)
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_translation_context(PropertyRNA *prop, const char *context)
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_PATH_RELATIVE_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
static constexpr auto PROP_READ_ONLY_DESCR
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
static constexpr auto PROP_PATH_SUPPORTS_TEMPLATES_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[]
union CollectionPropertyIterator::@220100362304005352221007113371015217044252346141 internal
PointerRNA builtin_parent
ListBaseIterator listbase
blender::CustomIDVectorSet< PropertyRNA *, PropertyRNAIdentifierGetter > * prop_lookup_set
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