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_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""}, \
68 {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", "A percentage between 0 and 100"}, \
69 {PROP_FACTOR, "FACTOR", 0, "Factor", "A factor between 0.0 and 1.0"}, \
70 {PROP_ANGLE, "ANGLE", 0, "Angle", "A rotational value specified in radians"}, \
71 {PROP_TIME, "TIME", 0, "Time (Scene Relative)", \
72 "Time specified in frames, converted to seconds based on scene frame rate"}, \
73 {PROP_TIME_ABSOLUTE, "TIME_ABSOLUTE", 0, "Time (Absolute)", \
74 "Time specified in seconds, independent of the scene"}, \
75 {PROP_DISTANCE, "DISTANCE", 0, "Distance", "A distance between two points"}, \
76 {PROP_DISTANCE_CAMERA, "DISTANCE_CAMERA", 0, "Camera Distance", ""}, \
77 {PROP_POWER, "POWER", 0, "Power", ""}, \
78 {PROP_TEMPERATURE, "TEMPERATURE", 0, "Temperature", ""}, \
79 {PROP_WAVELENGTH, "WAVELENGTH", 0, "Wavelength", ""}, \
80 {PROP_COLOR_TEMPERATURE, "COLOR_TEMPERATURE", 0, "Color Temperature", ""}, \
81 {PROP_FREQUENCY, "FREQUENCY", 0, "Frequency", ""}
83#define RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ARRAY_ITEMS \
84 {PROP_COLOR, "COLOR", 0, "Linear Color", "Color in the linear space"}, \
85 {PROP_TRANSLATION, "TRANSLATION", 0, "Translation", "Color in the gamma corrected space"}, \
86 {PROP_DIRECTION, "DIRECTION", 0, "Direction", ""}, \
87 {PROP_VELOCITY, "VELOCITY", 0, "Velocity", ""}, \
88 {PROP_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""}, \
89 {PROP_MATRIX, "MATRIX", 0, "Matrix", ""}, \
90 {PROP_EULER, "EULER", 0, "Euler Angles", "Euler rotation angles in radians"}, \
91 {PROP_QUATERNION, "QUATERNION", 0, "Quaternion", "Quaternion rotation (affects NLA blending)"}, \
92 {PROP_AXISANGLE, "AXISANGLE", 0, "Axis-Angle", "Angle and axis to rotate around"}, \
93 {PROP_XYZ, "XYZ", 0, "XYZ", ""}, \
94 {PROP_XYZ_LENGTH, "XYZ_LENGTH", 0, "XYZ Length", ""}, \
95 {PROP_COLOR_GAMMA, "COLOR_GAMMA", 0, "Gamma-Corrected Color", ""}, \
96 {PROP_COORDS, "COORDINATES", 0, "Coordinates", ""}, \
98 {PROP_LAYER, "LAYER", 0, "Layer", ""}, \
99 {PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""}
107 {0,
nullptr, 0,
nullptr,
nullptr},
114 {0,
nullptr, 0,
nullptr,
nullptr},
121 {0,
nullptr, 0,
nullptr,
nullptr},
136 {0,
nullptr, 0,
nullptr,
nullptr},
156 {0,
nullptr, 0,
nullptr,
nullptr},
161 "For operators: hide from places in the user interface where Blender would add the property "
162 "automatically, like Adjust Last Operation. Also this property is not written to presets.";
164 "For operators: the value of this property will not be remembered between invocations of the "
165 "operator; instead, each invocation will start by using the default value. Also this "
166 "property is not written to presets.";
170 "This property can be edited, even when it is used on linked data (which normally is "
171 "read-only). Note that edits to the property will not be saved to the blend file.";
176 "This path supports relative prefix \"//\" which is expanded the directory "
177 "where the current \".blend\" file is located.";
179 "This path supports the \"{variable_name}\" template syntax, which substitutes the "
180 "value of the referenced variable in place of the template expression";
192 "Adjust values proportionally to each other",
197 "Update on every keystroke in textedit 'mode'",
201 "PATH_SUPPORTS_BLEND_RELATIVE",
203 "Relative Path Support",
206 "SUPPORTS_TEMPLATES",
208 "Variable expression support",
210 {0,
nullptr, 0,
nullptr,
nullptr},
220 {0,
nullptr, 0,
nullptr,
nullptr},
225 "LIBRARY_OVERRIDABLE",
227 "Library Overridable",
228 "Make that property editable in library overrides of linked data-blocks.\n"
229 "NOTE: For a property to be overridable, its whole chain of parent properties must also be "
230 "defined as overridable"};
234 {0,
nullptr, 0,
nullptr,
nullptr},
243 "Do not use the names of the items, only their indices in the collection"},
248 "Allow users to add new items in that collection in library overrides"},
249 {0,
nullptr, 0,
nullptr,
nullptr},
258 "Search results are suggestions (other values may be entered)"},
260 {0,
nullptr, 0,
nullptr,
nullptr},
278# include <fmt/format.h>
280static CLG_LogRef LOG_COMPARE_OVERRIDE = {
"rna.rna_compare_override"};
284static void rna_Struct_identifier_get(
PointerRNA *
ptr,
char *value)
294static void rna_Struct_description_get(
PointerRNA *
ptr,
char *value)
314static void rna_Struct_translation_context_get(
PointerRNA *
ptr,
char *value)
316 strcpy(value, ((
StructRNA *)
ptr->data)->translation_context);
319static int rna_Struct_translation_context_length(
PointerRNA *
ptr)
321 return strlen(((
StructRNA *)
ptr->data)->translation_context);
337 nullptr, &RNA_Property, ((
StructRNA *)
ptr->data)->nameproperty);
365 }
while ((ptype = ptype->
base));
421 rna_inheritance_next_level_restart(iter,
ptr, skip, 0);
428 rna_inheritance_next_level_restart(iter, &iter->
parent, skip, 0);
437 rna_inheritance_next_level_restart(iter,
ptr, skip, 1);
444 rna_inheritance_next_level_restart(iter, &iter->
parent, skip, 1);
452 if (internal->
flag) {
458 rna_inheritance_properties_listbase_next(iter, rna_property_builtin);
486 rna_inheritance_properties_listbase_begin(
487 iter,
ptr, &srna->cont.properties, rna_property_builtin);
501 rna_inheritance_functions_listbase_next(iter, rna_function_builtin);
516 rna_inheritance_functions_listbase_begin(iter,
ptr, &srna->functions, rna_function_builtin);
548 newptr.
type = &RNA_Struct;
561 rna_Struct_properties_begin(iter, &newptr);
566 rna_Struct_properties_next(iter);
571 return rna_Struct_properties_get(iter);
584 prop = lookup_prop ? *lookup_prop :
nullptr;
586 *r_ptr = {
nullptr, &RNA_Property, prop};
594 *r_ptr = {
nullptr, &RNA_Property, prop};
599 }
while ((srna = srna->
base));
618 return &RNA_BoolProperty;
620 return &RNA_IntProperty;
622 return &RNA_FloatProperty;
624 return &RNA_StringProperty;
626 return &RNA_EnumProperty;
628 return &RNA_PointerProperty;
630 return &RNA_CollectionProperty;
632 return &RNA_Property;
636static void rna_Property_identifier_get(
PointerRNA *
ptr,
char *value)
648static void rna_Property_name_get(
PointerRNA *
ptr,
char *value)
652 strcpy(value, name ? name :
"");
659 return name ? strlen(name) : 0;
662static void rna_Property_description_get(
PointerRNA *
ptr,
char *value)
666 strcpy(value, description ? description :
"");
672 return description ? strlen(description) : 0;
675static void rna_Property_translation_context_get(
PointerRNA *
ptr,
char *value)
681static int rna_Property_translation_context_length(
PointerRNA *
ptr)
758static bool rna_Property_is_argument_optional_get(
PointerRNA *
ptr)
794static bool rna_Property_is_library_editable_flag_get(
PointerRNA *
ptr)
800static bool rna_Property_is_path_output_flag_get(
PointerRNA *
ptr)
806static bool rna_Property_is_path_supports_blend_relative_flag_get(
PointerRNA *
ptr)
812static bool rna_Property_is_path_supports_templates_flag_get(
PointerRNA *
ptr)
835 struct_tags !=
nullptr && struct_tags->
identifier !=
nullptr;
838 memcpy(&tmp, struct_tags,
sizeof(tmp));
854static void rna_Property_array_dimensions_get(
PointerRNA *
ptr,
877static bool rna_Property_is_registered_optional_get(
PointerRNA *
ptr)
903static int rna_NumberProperty_default_array_get_length(
const PointerRNA *
ptr,
920static void rna_IntProperty_default_array_get(
PointerRNA *
ptr,
int *values)
930static void rna_BoolProperty_default_array_get(
PointerRNA *
ptr,
bool *values)
940static void rna_FloatProperty_default_array_get(
PointerRNA *
ptr,
float *values)
1033static void rna_StringProperty_default_get(
PointerRNA *
ptr,
char *value)
1039static int rna_StringProperty_default_length(
PointerRNA *
ptr)
1046static int rna_StringProperty_max_length_get(
PointerRNA *
ptr)
1069 if ((eprop->
item_fn ==
nullptr) || (eprop->
item_fn == rna_EnumProperty_default_itemf) ||
1070 (
ptr->type == &RNA_EnumProperty) || (
C ==
nullptr))
1121 rna_EnumProperty_items_begin_impl(iter,
ptr, rna_enum_check_separator);
1127 rna_EnumProperty_items_begin_impl(iter,
ptr,
nullptr);
1130static void rna_EnumPropertyItem_identifier_get(
PointerRNA *
ptr,
char *value)
1135static int rna_EnumPropertyItem_identifier_length(
PointerRNA *
ptr)
1140static void rna_EnumPropertyItem_name_get(
PointerRNA *
ptr,
char *value)
1146 strcpy(value, eprop->
name);
1157 return strlen(eprop->
name);
1162static void rna_EnumPropertyItem_description_get(
PointerRNA *
ptr,
char *value)
1174static int rna_EnumPropertyItem_description_length(
PointerRNA *
ptr)
1211static void rna_Function_identifier_get(
PointerRNA *
ptr,
char *value)
1221static void rna_Function_description_get(
PointerRNA *
ptr,
char *value)
1243static bool rna_Function_registered_optional_get(
PointerRNA *
ptr)
1288 if (srna !=
nullptr) {
1296static bool rna_BlenderRNA_structs_lookup_string(
PointerRNA *
ptr,
1302 if (srna !=
nullptr) {
1316struct RNACompareOverrideDiffPropPtrContext {
1318 RNAPropertyOverrideDiffContext &rnadiff_ctx;
1321 ID *owner_id_a =
nullptr;
1322 ID *owner_id_b =
nullptr;
1323 PointerRNA propptr_a = {};
1324 PointerRNA propptr_b = {};
1331 bool no_ownership =
false;
1336 bool no_prop_name =
false;
1339 bool do_force_name =
false;
1341 bool use_id_pointer =
false;
1352 bool has_liboverride_apply_cb =
false;
1358 std::optional<std::string> rna_itemname_a;
1359 std::optional<std::string> rna_itemname_b;
1360 std::optional<ID *> rna_itemid_a;
1361 std::optional<ID *> rna_itemid_b;
1362 int rna_itemindex_a = -1;
1363 int rna_itemindex_b = -1;
1372 bool is_valid_for_diffing =
true;
1375 bool is_null =
false;
1376 bool is_type_diff =
false;
1378 RNACompareOverrideDiffPropPtrContext(RNAPropertyOverrideDiffContext &rnadiff_ctx_)
1379 : rnadiff_ctx(rnadiff_ctx_)
1383static void rna_property_override_diff_propptr_validate_diffing(
1384 RNACompareOverrideDiffPropPtrContext &ptrdiff_ctx)
1386 PointerRNA *propptr_a = &ptrdiff_ctx.propptr_a;
1387 PointerRNA *propptr_b = &ptrdiff_ctx.propptr_b;
1388 const bool no_ownership = ptrdiff_ctx.no_ownership;
1389 const bool no_prop_name = ptrdiff_ctx.no_prop_name;
1390 const bool do_force_name = ptrdiff_ctx.do_force_name;
1392 ptrdiff_ctx.is_valid_for_diffing =
true;
1396 if (do_force_name || ptrdiff_ctx.use_id_pointer) {
1402 if (
ELEM(
nullptr, propptr_b, propptr_b->
type, propptr_b->
data)) {
1403 ptrdiff_ctx.is_null =
true;
1407 ptrdiff_ctx.is_null =
true;
1408 ptrdiff_ctx.is_type_diff = propptr_a->
type != propptr_b->
type;
1410 ptrdiff_ctx.is_valid_for_diffing =
false;
1414 ptrdiff_ctx.is_null = (
ELEM(
nullptr, propptr_b, propptr_b->
type, propptr_b->
data));
1415 ptrdiff_ctx.is_type_diff = (propptr_b ==
nullptr || propptr_b->
type != propptr_a->
type);
1416 ptrdiff_ctx.is_valid_for_diffing = !((ptrdiff_ctx.is_id && no_ownership) ||
1417 ptrdiff_ctx.is_null || ptrdiff_ctx.is_type_diff);
1424 if (!no_prop_name && (ptrdiff_ctx.is_valid_for_diffing || do_force_name)) {
1428 PropertyRNA *nameprop_b = (propptr_b !=
nullptr && propptr_b->
type !=
nullptr) ?
1431 const bool do_id_pointer = ptrdiff_ctx.use_id_pointer && ptrdiff_ctx.is_id;
1437 int rna_itemname_a_len = 0, rna_itemname_b_len = 0;
1438 char *rna_itemname_a =
nullptr;
1439 char *rna_itemname_b =
nullptr;
1442 if (nameprop_a !=
nullptr) {
1444 propptr_a, nameprop_a, buff_a,
sizeof(buff_a), &rna_itemname_a_len);
1446 ptrdiff_ctx.rna_itemname_a = rna_itemname_a;
1449 if (nameprop_b !=
nullptr) {
1451 propptr_b, nameprop_b, buff_b,
sizeof(buff_b), &rna_itemname_b_len);
1452 ptrdiff_ctx.rna_itemname_b = rna_itemname_b;
1458 ID *rna_itemid_a = (do_id_pointer && propptr_a->
data) ?
static_cast<ID *
>(propptr_a->
data) :
1460 ID *rna_itemid_b = (do_id_pointer && propptr_b->
data) ?
static_cast<ID *
>(propptr_b->
data) :
1462 if (do_id_pointer) {
1463 ptrdiff_ctx.rna_itemid_a = rna_itemid_a;
1464 ptrdiff_ctx.rna_itemid_b = rna_itemid_b;
1467 if (rna_itemname_a !=
nullptr && rna_itemname_b !=
nullptr) {
1468 if (rna_itemid_a != rna_itemid_b || rna_itemname_a_len != rna_itemname_b_len ||
1469 rna_itemname_a[0] != rna_itemname_b[0] || !
STREQ(rna_itemname_a, rna_itemname_b))
1471 ptrdiff_ctx.is_valid_for_diffing =
false;
1475 if (
UNLIKELY(rna_itemname_a && rna_itemname_a != buff_a)) {
1478 if (
UNLIKELY(rna_itemname_b && rna_itemname_b != buff_b)) {
1483 if (ptrdiff_ctx.is_id) {
1489static void rna_property_override_diff_propptr(
Main *bmain,
1490 RNACompareOverrideDiffPropPtrContext &ptrdiff_ctx)
1492 ID *owner_id_a = ptrdiff_ctx.owner_id_a;
1493 ID *owner_id_b = ptrdiff_ctx.owner_id_b;
1494 PointerRNA *propptr_a = &ptrdiff_ctx.propptr_a;
1495 PointerRNA *propptr_b = &ptrdiff_ctx.propptr_b;
1498 const bool no_ownership = ptrdiff_ctx.no_ownership;
1501 const eRNAOverrideMatch liboverride_flags = ptrdiff_ctx.rnadiff_ctx.liboverride_flags;
1502 const char *rna_path = ptrdiff_ctx.rnadiff_ctx.rna_path;
1503 size_t rna_path_len = ptrdiff_ctx.rnadiff_ctx.rna_path_len;
1504 const PropertyType property_type = ptrdiff_ctx.property_type;
1506 std::optional<std::string> &rna_itemname_a = ptrdiff_ctx.rna_itemname_a;
1507 std::optional<std::string> &rna_itemname_b = ptrdiff_ctx.rna_itemname_b;
1508 const int rna_itemindex_a = ptrdiff_ctx.rna_itemindex_a;
1509 const int rna_itemindex_b = ptrdiff_ctx.rna_itemindex_b;
1513 rna_property_override_diff_propptr_validate_diffing(ptrdiff_ctx);
1517 const bool is_valid_for_diffing = ptrdiff_ctx.is_valid_for_diffing;
1518 const bool is_id = ptrdiff_ctx.is_id;
1519 const bool is_null = ptrdiff_ctx.is_null;
1520 const bool is_type_diff = ptrdiff_ctx.is_type_diff;
1522 const bool has_liboverride_apply_cb = ptrdiff_ctx.has_liboverride_apply_cb;
1523 const bool do_create = (liboverride !=
nullptr &&
1526 (is_id || has_liboverride_apply_cb) &&
1528 rna_path !=
nullptr);
1546 if (no_ownership || is_null || is_type_diff || !is_valid_for_diffing) {
1550 ptrdiff_ctx.rnadiff_ctx.comparison = (propptr_a->
data != propptr_b->
data);
1552 if (do_create && ptrdiff_ctx.rnadiff_ctx.comparison != 0) {
1553 bool created =
false;
1555 liboverride, rna_path, &created);
1558 if (op !=
nullptr) {
1567 if (created || (rna_itemname_a && !rna_itemname_a->empty()) ||
1568 (rna_itemname_b && !rna_itemname_b->empty()) || rna_itemindex_a != -1 ||
1569 rna_itemindex_b != -1)
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;
1577 ptrdiff_ctx.rna_itemid_b,
1578 ptrdiff_ctx.rna_itemid_a,
1596 if (is_id && no_ownership) {
1597 if (opop ==
nullptr) {
1598 const char *subitem_refname = rna_itemname_b ? rna_itemname_b->c_str() :
nullptr;
1599 const char *subitem_locname = rna_itemname_a ? rna_itemname_a->c_str() :
nullptr;
1604 ptrdiff_ctx.rna_itemid_b,
1605 ptrdiff_ctx.rna_itemid_a,
1622 ID *id_a =
static_cast<ID *
>(propptr_a->
data);
1623 ID *id_b =
static_cast<ID *
>(propptr_b->
data);
1624 if (
ELEM(
nullptr, id_a, id_b)) {
1637 "Not checking matching ID pointer properties, since owner %s is tagged as "
1638 "needing resync.\n",
1661# define RNA_PATH_BUFFSIZE 8192
1664 char *extended_rna_path = extended_rna_path_buffer;
1665 size_t extended_rna_path_len = 0;
1671 if ((rna_itemname_a && !rna_itemname_a->empty()) &&
1672 (rna_itemname_b && !rna_itemname_b->empty()))
1674 BLI_assert(*rna_itemname_a == *rna_itemname_b);
1678 esc_item_name, rna_itemname_a->c_str(),
sizeof(esc_item_name));
1679 extended_rna_path_len = rna_path_len + 2 + esc_item_name_len + 2;
1684 memcpy(extended_rna_path, rna_path, rna_path_len);
1685 extended_rna_path[rna_path_len] =
'[';
1686 extended_rna_path[rna_path_len + 1] =
'"';
1687 memcpy(extended_rna_path + rna_path_len + 2, esc_item_name, esc_item_name_len);
1688 extended_rna_path[rna_path_len + 2 + esc_item_name_len] =
'"';
1689 extended_rna_path[rna_path_len + 2 + esc_item_name_len + 1] =
']';
1690 extended_rna_path[extended_rna_path_len] =
'\0';
1692 else if (rna_itemindex_a != -1) {
1693 BLI_assert(rna_itemindex_a == rna_itemindex_b);
1696 char item_index_buff[32];
1697 size_t item_index_buff_len = 0;
1698 if (rna_itemindex_a == 0) {
1699 item_index_buff[0] =
'0';
1700 item_index_buff_len = 1;
1704 for (index = rna_itemindex_a;
1705 index > 0 && item_index_buff_len <
sizeof(item_index_buff);
1708 item_index_buff[item_index_buff_len++] =
'0' + char(index % 10);
1713 extended_rna_path_len = rna_path_len + item_index_buff_len + 2;
1718 memcpy(extended_rna_path, rna_path, rna_path_len);
1719 extended_rna_path[rna_path_len] =
'[';
1720 for (
size_t i = 1;
i <= item_index_buff_len;
i++) {
1723 extended_rna_path[rna_path_len +
i] = item_index_buff[item_index_buff_len -
i];
1725 extended_rna_path[rna_path_len + 1 + item_index_buff_len] =
']';
1726 extended_rna_path[extended_rna_path_len] =
'\0';
1729 extended_rna_path = (
char *)rna_path;
1730 extended_rna_path_len = rna_path_len;
1738 extended_rna_path_len,
1741 &ptrdiff_ctx.rnadiff_ctx.report_flag);
1742 ptrdiff_ctx.rnadiff_ctx.comparison = !match;
1752 if (op !=
nullptr) {
1756 if (!
ELEM(extended_rna_path, extended_rna_path_buffer, rna_path)) {
1760# undef RNA_PATH_BUFFSIZE
1766 ptrdiff_ctx.rnadiff_ctx.comparison = !
RNA_struct_equals(bmain, propptr_a, propptr_b, mode);
1770# define RNA_PROPERTY_GET_SINGLE(_typename, _ptr, _prop, _index) \
1771 (is_array ? RNA_property_##_typename##_get_index((_ptr), (_prop), (_index)) : \
1772 RNA_property_##_typename##_get((_ptr), (_prop)))
1773# define RNA_PROPERTY_SET_SINGLE(_typename, _ptr, _prop, _index, _value) \
1774 (is_array ? RNA_property_##_typename##_set_index((_ptr), (_prop), (_index), (_value)) : \
1775 RNA_property_##_typename##_set((_ptr), (_prop), (_value)))
1794 const char *rna_path = rnadiff_ctx.
rna_path;
1802 const bool do_create = liboverride !=
nullptr &&
1804 rna_path !=
nullptr;
1809 bool created =
false;
1812 switch (rna_prop_type) {
1816 bool *array_a, *array_b;
1828 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
bool) * len_a);
1830 if (do_create && rnadiff_ctx.
comparison != 0) {
1834 if (op !=
nullptr && created) {
1853 if (array_a != array_stack_a) {
1856 if (array_b != array_stack_b) {
1863 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
1865 if (do_create && rnadiff_ctx.
comparison != 0) {
1866 op = BKE_lib_override_library_property_get(liboverride, rna_path, &created);
1868 if (op != nullptr && created) {
1869 BKE_lib_override_library_property_operation_get(op,
1870 LIBOVERRIDE_OP_REPLACE,
1880 rnadiff_ctx.report_flag |= RNA_OVERRIDE_MATCH_RESULT_CREATED;
1890 int *array_a, *array_b;
1900 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
int) * len_a);
1902 if (do_create && rnadiff_ctx.
comparison != 0) {
1906 if (op !=
nullptr && created) {
1927 if (array_a != array_stack_a) {
1930 if (array_b != array_stack_b) {
1937 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
1939 if (do_create && rnadiff_ctx.
comparison != 0) {
1940 op = BKE_lib_override_library_property_get(liboverride, rna_path, &created);
1942 if (op != nullptr && created) {
1943 BKE_lib_override_library_property_operation_get(op,
1944 LIBOVERRIDE_OP_REPLACE,
1954 rnadiff_ctx.report_flag |= RNA_OVERRIDE_MATCH_RESULT_CREATED;
1964 float *array_a, *array_b;
1976 rnadiff_ctx.
comparison = memcmp(array_a, array_b,
sizeof(
float) * len_a);
1978 if (do_create && rnadiff_ctx.
comparison != 0) {
1982 if (op !=
nullptr && created) {
2001 if (array_a != array_stack_a) {
2004 if (array_b != array_stack_b) {
2011 rnadiff_ctx.
comparison = (value_a < value_b) ? -1 : (value_a > value_b) ? 1 : 0;
2013 if (do_create && rnadiff_ctx.
comparison != 0) {
2014 op = BKE_lib_override_library_property_get(liboverride, rna_path, &created);
2016 if (op != nullptr && created) {
2017 BKE_lib_override_library_property_operation_get(op,
2018 LIBOVERRIDE_OP_REPLACE,
2028 rnadiff_ctx.report_flag |= RNA_OVERRIDE_MATCH_RESULT_CREATED;
2040 if (do_create && rnadiff_ctx.
comparison != 0) {
2043 if (op !=
nullptr && created) {
2062 char fixed_a[4096], fixed_b[4096];
2063 int len_str_a, len_str_b;
2065 ptr_a, rawprop_a, fixed_a,
sizeof(fixed_a), &len_str_a);
2067 ptr_b, rawprop_b, fixed_b,
sizeof(fixed_b), &len_str_b);
2072 rnadiff_ctx.
comparison = len_str_a < len_str_b ? -1 :
2073 len_str_a > len_str_b ? 1 :
2074 strcmp(value_a, value_b);
2076 rnadiff_ctx.
comparison = strcmp(value_a, value_b);
2078 if (do_create && rnadiff_ctx.
comparison != 0) {
2081 if (op !=
nullptr && created) {
2097 if (value_a != fixed_a) {
2100 if (value_b != fixed_b) {
2116 RNACompareOverrideDiffPropPtrContext ptrdiff_ctx(rnadiff_ctx);
2117 ptrdiff_ctx.owner_id_a = ptr_a->
owner_id;
2118 ptrdiff_ctx.owner_id_b = ptr_b->
owner_id;
2121 ptrdiff_ctx.no_prop_name =
true;
2122 ptrdiff_ctx.no_ownership = no_ownership;
2131 ptrdiff_ctx.has_liboverride_apply_cb =
true;
2133 rna_property_override_diff_propptr(bmain, ptrdiff_ctx);
2148 if (!has_liboverride_apply_cb &&
2152 "RNA collection '%s' defined as supporting liboverride insertion of items, but "
2153 "no liboverride apply callback defined for it. No insertion will happen.",
2159 const bool use_collection_insertion = has_liboverride_apply_cb && do_create &&
2167 std::optional<std::string> prev_rna_itemname_a;
2168 std::optional<ID *> prev_rna_itemid_a;
2174 if (use_collection_insertion) {
2178 if (op !=
nullptr) {
2188 for (; iter_a.
valid && !abort;) {
2190 bool is_valid_for_insertion = use_collection_insertion;
2192 RNACompareOverrideDiffPropPtrContext ptrdiff_ctx(rnadiff_ctx);
2193 ptrdiff_ctx.owner_id_a = ptr_a->
owner_id;
2194 ptrdiff_ctx.owner_id_b = ptr_b->
owner_id;
2195 ptrdiff_ctx.propptr_a = iter_a.
ptr;
2197 ptrdiff_ctx.propptr_b = iter_b.
ptr;
2199 ptrdiff_ctx.no_prop_name = no_prop_name;
2200 ptrdiff_ctx.do_force_name = !no_prop_name;
2201 ptrdiff_ctx.use_id_pointer = !no_prop_name;
2202 ptrdiff_ctx.no_ownership = no_ownership;
2204 ptrdiff_ctx.has_liboverride_apply_cb = has_liboverride_apply_cb;
2206 if (iter_b.
valid || use_collection_insertion) {
2207 rna_property_override_diff_propptr_validate_diffing(ptrdiff_ctx);
2210 ptrdiff_ctx.no_prop_name =
true;
2211 ptrdiff_ctx.do_force_name =
false;
2212 ptrdiff_ctx.use_id_pointer =
false;
2215 const bool is_valid_for_diffing = ptrdiff_ctx.is_valid_for_diffing;
2216 const bool is_id = ptrdiff_ctx.is_id;
2219 if (is_id || is_valid_for_diffing) {
2220 is_valid_for_insertion =
false;
2226 "Checking %s, %s [%d] vs %s [%d]; is_id: %d, diffing: %d; "
2227 "insert: %d (could be used: %d, do_create: %d)\n",
2229 ptrdiff_ctx.rna_itemname_a ? ptrdiff_ctx.rna_itemname_a->c_str() :
"",
2231 ptrdiff_ctx.rna_itemname_b ? ptrdiff_ctx.rna_itemname_b->c_str() :
"",
2234 is_valid_for_diffing,
2235 is_valid_for_insertion,
2236 use_collection_insertion,
2241 if (!(is_id || is_valid_for_diffing || is_valid_for_insertion)) {
2256 if (is_valid_for_insertion && use_collection_insertion) {
2262 (no_prop_name || !prev_rna_itemname_a) ?
nullptr : prev_rna_itemname_a->c_str(),
2263 (no_prop_name || !ptrdiff_ctx.rna_itemname_a) ?
2265 ptrdiff_ctx.rna_itemname_a->c_str(),
2267 ptrdiff_ctx.rna_itemid_a,
2274 printf(
"%s: Adding insertion op override after '%s'/%d\n",
2276 prev_rna_itemname_a ? prev_rna_itemname_a->c_str() :
"",
2283 else if (is_id || is_valid_for_diffing) {
2284 if (equals || do_create) {
2285 ptrdiff_ctx.rna_itemindex_a = idx_a;
2286 ptrdiff_ctx.rna_itemindex_b = idx_b;
2287 rna_property_override_diff_propptr(bmain, ptrdiff_ctx);
2288 equals = equals && (rnadiff_ctx.
comparison == 0);
2292 if (ptrdiff_ctx.rna_itemname_a) {
2293 prev_rna_itemname_a = std::move(*ptrdiff_ctx.rna_itemname_a);
2296 prev_rna_itemname_a.reset();
2298 prev_rna_itemid_a = ptrdiff_ctx.rna_itemid_a;
2300 if (!do_create && !equals) {
2305 if (!(use_collection_insertion && !(is_id || is_valid_for_diffing))) {
2313 }
while (iter_a.
valid);
2326 equals = equals && !(iter_a.
valid || iter_b.
valid) && !abort;
2338 if (op !=
nullptr) {
2356 const int len_local,
2357 const int len_reference,
2358 const int len_storage,
2361 BLI_assert(len_local == len_reference && (!ptr_storage || len_local == len_storage));
2364 bool changed =
false;
2365 const bool is_array = len_local > 0;
2383 BLI_assert_msg(0,
"Boolean properties support no override diff operation");
2386 int prop_min, prop_max;
2389 if (is_array && index == -1) {
2391 int *array_a, *array_b;
2409 for (
int i = len_local;
i--;) {
2410 array_b[
i] = fac * (array_b[
i] - array_a[
i]);
2411 if (array_b[
i] < prop_min || array_b[
i] > prop_max) {
2413 for (
int j = len_local; j--;) {
2414 array_b[j] = j >=
i ? -array_b[j] : fac * (array_a[j] - array_b[j]);
2415 if (array_b[j] < prop_min || array_b[j] > prop_max) {
2430 if (array_b != array_stack_b) {
2436 BLI_assert_msg(0,
"Unsupported RNA override diff operation on integer");
2440 if (array_a != array_stack_a) {
2445 const int value = RNA_PROPERTY_GET_SINGLE(
int, ptr_reference, prop_reference, index);
2453 int b = fac * (RNA_PROPERTY_GET_SINGLE(
int, ptr_local, prop_local, index) - value);
2463 RNA_PROPERTY_SET_SINGLE(
int, ptr_storage, prop_storage, index,
b);
2467 BLI_assert_msg(0,
"Unsupported RNA override diff operation on integer");
2474 float prop_min, prop_max;
2477 if (is_array && index == -1) {
2479 float *array_a, *array_b;
2497 for (
int i = len_local;
i--;) {
2498 array_b[
i] = fac * (array_b[
i] - array_a[
i]);
2499 if (array_b[
i] < prop_min || array_b[
i] > prop_max) {
2501 for (
int j = len_local; j--;) {
2502 array_b[j] = j >=
i ? -array_b[j] : fac * (array_a[j] - array_b[j]);
2503 if (array_b[j] < prop_min || array_b[j] > prop_max) {
2518 if (array_b != array_stack_b) {
2529 for (
int i = len_local;
i--;) {
2530 array_b[
i] = array_a[
i] == 0.0f ? array_b[
i] : array_b[
i] / array_a[
i];
2531 if (array_b[
i] < prop_min || array_b[
i] > prop_max) {
2541 if (array_b != array_stack_b) {
2547 BLI_assert_msg(0,
"Unsupported RNA override diff operation on float");
2551 if (array_a != array_stack_a) {
2556 const float value = RNA_PROPERTY_GET_SINGLE(
float, ptr_reference, prop_reference, index);
2564 float b = fac * (RNA_PROPERTY_GET_SINGLE(
float, ptr_local, prop_local, index) - value);
2574 RNA_PROPERTY_SET_SINGLE(
float, ptr_storage, prop_storage, index,
b);
2579 (value == 0.0f ? 1.0f : value);
2589 BLI_assert_msg(0,
"Unsupported RNA override diff operation on float");
2597 BLI_assert_msg(0,
"Enum properties support no override diff operation");
2600 BLI_assert_msg(0,
"Pointer properties support no override diff operation");
2603 BLI_assert_msg(0,
"String properties support no override diff operation");
2607 BLI_assert_msg(0,
"Collection properties support no override diff operation");
2625 const int len_dst = rnaapply_ctx.
len_src;
2626 const int len_src = rnaapply_ctx.
len_src;
2635 if (prop_src_type != prop_dst_type ||
2642 "%s.%s: Inconsistency between stored property type (%d) and linked reference one "
2643 "(%d), skipping liboverride apply",
2645 prop_rna_path ? prop_rna_path->c_str() :
2646 fmt::format(
" ... .{}", prop_dst->
name).c_str(),
2656 BLI_assert(len_dst == len_src && (!prop_storage || len_dst == len_storage));
2659 const bool is_array = len_dst > 0;
2661 const short override_op = opop->
operation;
2663 bool ret_success =
true;
2667 if (is_array && index == -1) {
2677 switch (override_op) {
2682 BLI_assert_msg(0,
"Unsupported RNA override operation on boolean");
2686 if (array_a != array_stack_a) {
2691 const bool value = RNA_PROPERTY_GET_SINGLE(
boolean, ptr_src, prop_src, index);
2693 switch (override_op) {
2695 RNA_PROPERTY_SET_SINGLE(
boolean, ptr_dst, prop_dst, index, value);
2698 BLI_assert_msg(0,
"Unsupported RNA override operation on boolean");
2704 if (is_array && index == -1) {
2706 int *array_a, *array_b;
2711 switch (override_op) {
2724 for (
int i = len_dst;
i--;) {
2725 array_a[
i] += array_b[
i];
2729 for (
int i = len_dst;
i--;) {
2730 array_a[
i] -= array_b[
i];
2734 if (array_b != array_stack_b) {
2739 BLI_assert_msg(0,
"Unsupported RNA override operation on integer");
2743 if (array_a != array_stack_a) {
2748 const int storage_value = prop_storage ? RNA_PROPERTY_GET_SINGLE(
2749 int, ptr_storage, prop_storage, index) :
2752 switch (override_op) {
2754 RNA_PROPERTY_SET_SINGLE(
int,
2758 RNA_PROPERTY_GET_SINGLE(
int, ptr_src, prop_src, index));
2761 RNA_PROPERTY_SET_SINGLE(
int,
2765 RNA_PROPERTY_GET_SINGLE(
int, ptr_dst, prop_dst, index) -
2769 RNA_PROPERTY_SET_SINGLE(
int,
2773 RNA_PROPERTY_GET_SINGLE(
int, ptr_dst, prop_dst, index) -
2777 BLI_assert_msg(0,
"Unsupported RNA override operation on integer");
2783 if (is_array && index == -1) {
2785 float *array_a, *array_b;
2791 switch (override_op) {
2805 for (
int i = len_dst;
i--;) {
2806 array_a[
i] += array_b[
i];
2810 for (
int i = len_dst;
i--;) {
2811 array_a[
i] -= array_b[
i];
2815 for (
int i = len_dst;
i--;) {
2816 array_a[
i] *= array_b[
i];
2820 if (array_b != array_stack_b) {
2825 BLI_assert_msg(0,
"Unsupported RNA override operation on float");
2829 if (array_a != array_stack_a) {
2834 const float storage_value = prop_storage ? RNA_PROPERTY_GET_SINGLE(
2835 float, ptr_storage, prop_storage, index) :
2838 switch (override_op) {
2840 RNA_PROPERTY_SET_SINGLE(
float,
2844 RNA_PROPERTY_GET_SINGLE(
float, ptr_src, prop_src, index));
2847 RNA_PROPERTY_SET_SINGLE(
float,
2851 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) +
2855 RNA_PROPERTY_SET_SINGLE(
float,
2859 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) -
2863 RNA_PROPERTY_SET_SINGLE(
float,
2867 RNA_PROPERTY_GET_SINGLE(
float, ptr_dst, prop_dst, index) *
2871 BLI_assert_msg(0,
"Unsupported RNA override operation on float");
2879 switch (override_op) {
2893 switch (override_op) {
2898 BLI_assert_msg(0,
"Unsupported RNA override operation on pointer");
2907 switch (override_op) {
2912 BLI_assert_msg(0,
"Unsupported RNA override operation on string");
2916 if (value != buff) {
2927 if (!(is_src_idprop && is_dst_idprop)) {
2929 "'%s': Override operations on RNA collections require a specific override "
2930 "apply callback to be defined.",
2935 switch (override_op) {
2937 PointerRNA item_ptr_src, item_ptr_ref, item_ptr_dst;
2939 bool is_valid =
false;
2942 int item_index_src, item_index_ref;
2952 item_index_dst = item_index_ref + 1;
2991 ptr_dst, prop_dst, item_index_added, item_index_dst);
2995 BLI_assert_msg(0,
"Unsupported RNA override operation on collection");
3013# undef RNA_PROPERTY_GET_SINGLE
3014# undef RNA_PROPERTY_SET_SINGLE
3033 return data->value ? strlen(
data->value) : 0;
3081 prop,
"rna_Struct_identifier_get",
"rna_Struct_identifier_length",
nullptr);
3088 prop,
"rna_Struct_description_get",
"rna_Struct_description_length",
nullptr);
3094 "rna_Struct_translation_context_get",
3095 "rna_Struct_translation_context_length",
3098 prop,
"Translation Context",
"Translation context of the struct's name");
3113 "Struct in which this struct is always nested, and to which it logically belongs");
3125 "rna_Struct_properties_begin",
3126 "rna_Struct_properties_next",
3127 "rna_iterator_listbase_end",
3128 "rna_Struct_properties_get",
3139 "rna_Struct_functions_begin",
3140 "rna_Struct_functions_next",
3141 "rna_iterator_listbase_end",
3142 "rna_Struct_functions_get",
3153 "rna_Struct_property_tags_begin",
3154 "rna_iterator_array_next",
3155 "rna_iterator_array_end",
3156 "rna_iterator_array_get",
3162 prop,
"Property Tags",
"Tags that properties can use to influence behavior");
3170 {0,
nullptr, 0,
nullptr,
nullptr},
3181 prop,
"rna_Property_name_get",
"rna_Property_name_length",
nullptr);
3187 prop,
"rna_Property_identifier_get",
"rna_Property_identifier_length",
nullptr);
3194 prop,
"rna_Property_description_get",
"rna_Property_description_length",
nullptr);
3200 "rna_Property_translation_context_get",
3201 "rna_Property_translation_context_length",
3204 prop,
"Translation Context",
"Translation context of the property's name");
3224 prop,
"Base",
"Struct definition used for properties assigned to this item");
3258 prop,
"Required",
"False when this property is an optional argument in an RNA function");
3265 "Optional Argument",
3266 "True when the property is optional in a Python function implementing an RNA function");
3292 prop,
"Return",
"True when this property is an output value from an RNA function");
3298 prop,
"Registered",
"Property is registered as part of type registration");
3304 "Registered Optionally",
3305 "Property is optionally registered as part of type registration");
3321 prop,
"Library Editable",
"Property is editable from linked instances (changes not saved)");
3327 prop,
"Path Output",
"Property is a filename, filepath or directory output");
3332 prop,
"rna_Property_is_path_supports_blend_relative_flag_get",
nullptr);
3336 "Property is a path which supports the \"//\" prefix, "
3337 "signifying the location as relative to the \".blend\" file's directory");
3342 prop,
"rna_Property_is_path_supports_templates_flag_get",
nullptr);
3345 "Variable Expression Support",
3346 "Property is a path which supports the \"{variable_name}\" variable expression syntax, "
3347 "which substitutes the value of the referenced variable in place of the expression");
3355 prop,
"Tags",
"Subset of tags (defined in parent struct) that are set for this property");
3370 prop,
"rna_Function_identifier_get",
"rna_Function_identifier_length",
nullptr);
3377 prop,
"rna_Function_description_get",
"rna_Function_description_length",
nullptr);
3384 "rna_Function_parameters_begin",
3385 "rna_iterator_listbase_next",
3386 "rna_iterator_listbase_end",
3387 "rna_iterator_listbase_get",
3398 prop,
"Registered",
"Function is registered as callback as part of type registration");
3405 "Registered Optionally",
3406 "Function is optionally registered as callback part of type registration");
3414 "Function does not pass itself as an argument (becomes a static method in Python)");
3421 "Function passes itself type as an argument (becomes a class method "
3422 "in Python if use_self is false)");
3455 prop,
"rna_NumberProperty_default_array_get_length");
3541 prop,
"Step",
"Step size used by number buttons, for floats 1/100th of the step size");
3549 "Number of digits after the dot used by buttons. Fraction is "
3550 "automatically hidden for exact integer values of fields with unit "
3551 "'NONE' or 'TIME' (frame count) and step divisible by 100.");
3562 prop,
"rna_StringProperty_default_get",
"rna_StringProperty_default_length",
nullptr);
3569 prop,
"Maximum Length",
"Maximum length of the string, 0 means unlimited");
3580 prop,
"rna_EnumProperty_default_get",
nullptr,
"rna_EnumProperty_default_itemf");
3589 prop,
"rna_EnumProperty_default_get",
nullptr,
"rna_EnumProperty_default_itemf");
3596 "rna_EnumProperty_items_begin",
3597 "rna_iterator_array_next",
3598 "rna_iterator_array_end",
3599 "rna_iterator_array_get",
3610 "rna_EnumProperty_items_begin",
3611 "rna_iterator_array_next",
3612 "rna_iterator_array_end",
3613 "rna_iterator_array_get",
3621 "Possible values for the property (never calls optional dynamic generation of those)");
3629 "rna_EnumProperty_items_ui_begin",
3630 "rna_iterator_array_next",
3631 "rna_iterator_array_end",
3632 "rna_iterator_array_get",
3639 "Static Items with UI Elements",
3640 "Possible values for the property (never calls optional dynamic generation of those). "
3641 "Includes UI elements (separators and section headings).");
3645 srna,
"Enum Item Definition",
"Definition of a choice in an RNA enum property");
3651 prop,
"rna_EnumPropertyItem_name_get",
"rna_EnumPropertyItem_name_length",
nullptr);
3657 "rna_EnumPropertyItem_description_get",
3658 "rna_EnumPropertyItem_description_length",
3665 "rna_EnumPropertyItem_identifier_get",
3666 "rna_EnumPropertyItem_identifier_length",
3692 prop,
"rna_PointerProperty_fixed_type_get",
nullptr,
nullptr,
nullptr);
3696 prop,
"rna_CollectionProperty_fixed_type_get",
nullptr,
nullptr,
nullptr);
3714 prop,
"rna_PrimitiveString_value_get",
"rna_PrimitiveString_value_length",
nullptr);
3760 "RNA floating-point number (single precision) property definition");
3773 "RNA enumeration property definition, to choose from a number of predefined options");
3779 srna,
"Pointer Definition",
"RNA pointer property to point to another RNA struct");
3785 "Collection Definition",
3786 "RNA collection property to define lists, arrays and mappings");
3801 "rna_BlenderRNA_structs_begin",
3802 "rna_iterator_listbase_next",
3803 "rna_iterator_listbase_end",
3804 "rna_iterator_listbase_get",
3812 "rna_BlenderRNA_structs_length",
3813 "rna_BlenderRNA_structs_lookup_int",
3814 "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 UNUSED_VARS_NDEBUG(...)
#define BLT_I18NCONTEXT_UNIT
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
#define CLOG_INFO(clg_ref, level,...)
@ LIBOVERRIDE_PROP_OP_TAG_UNUSED
@ LIBOVERRIDE_OP_SUBTRACT
@ LIBOVERRIDE_OP_MULTIPLY
@ LIBOVERRIDE_OP_INSERT_BEFORE
@ LIBOVERRIDE_OP_INSERT_AFTER
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE
@ ID_TAG_LIBOVERRIDE_NEED_RESYNC
@ 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
#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
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)
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)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
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)
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)
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_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)
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
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[]
PointerRNA builtin_parent
ListBaseIterator listbase
union CollectionPropertyIterator::@277172262001176145116102322066145204253046376362 internal
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