10#include <fmt/format.h>
31#ifdef DEBUG_OVERRIDE_TIMEIT
46#include "RNA_prototypes.hh"
66 std::optional<std::string> *r_rna_path)
70 const char *rna_path_prefix =
nullptr;
72 if (r_rna_path !=
nullptr) {
73 *r_rna_path = std::nullopt;
87 switch (
GS(
id->name)) {
89 owner_id = (id_cast<Key *>(
id))->from;
90 rna_path_prefix =
"shape_keys";
102 if (r_rna_path ==
nullptr) {
107 if (rna_path_prefix) {
109 fmt::format(
"{}{}{}", rna_path_prefix, (*
rna_path)[0] ==
'[' ?
"" :
".", *
rna_path));
112 r_rna_path->emplace(std::move(*
rna_path));
140 if (
const std::optional<AncestorPointerRNA> ancestor =
185 const bool is_overridable)
219 RNAPropertyOverrideApplyContext &rnaapply_ctx);
221 RNAPropertyOverrideApplyContext &rnaapply_ctx);
246 rnaapply_ctx.
ptr_src = *fromptr;
272 PropertyRNAOrID *prop_a,
273 PropertyRNAOrID *prop_b,
274 const char *rna_path,
275 const size_t rna_path_len,
277 IDOverrideLibrary *liboverride,
292 bmain, &prop_a, &prop_b,
nullptr, 0, mode,
nullptr,
eRNAOverrideMatch{},
nullptr) ==
302 if (ptr_a ==
nullptr && ptr_b ==
nullptr) {
305 if (ptr_a ==
nullptr || ptr_b ==
nullptr) {
350 const size_t rna_path_len,
382 const bool is_array_a = prop_a->
is_array;
383 const bool is_array_b = prop_b->
is_array;
385 if (is_array_a != is_array_b) {
388 return is_array_a ? 1 : -1;
395 if (len_a != len_b) {
398 return len_a > len_b ? 1 : -1;
401 if (is_array_a && len_a == 0) {
411 override_diff =
nullptr;
417 override_diff =
nullptr;
422 if (override_diff ==
nullptr) {
427 if (override_diff ==
nullptr) {
430 "'%s' gives unmatching or nullptr RNA diff callbacks, should not happen (%d vs. %d)",
447 rnadiff_ctx.
prop_a = prop_a;
448 rnadiff_ctx.
prop_b = prop_b;
449 rnadiff_ctx.
mode = mode;
455 override_diff(bmain, rnadiff_ctx);
457 if (r_report_flags) {
475 int len_local, len_reference, len_storage = 0;
476 bool changed =
false;
478 if (ptr_storage ==
nullptr || !*ptr_storage || prop_storage ==
nullptr) {
495 if (len_local != len_reference || len_local != len_storage) {
506 override_store =
nullptr;
512 override_store =
nullptr;
517 if (override_store ==
nullptr) {
525 override_store =
nullptr;
528 if (override_store ==
nullptr) {
531 "'%s' gives unmatching or nullptr RNA store callbacks, should not happen (%d vs. %d)",
547 if (override_store(bmain,
577 const short override_op = opop->
operation;
580 opop, ptr_dst, ptr_src, ptr_storage, prop_dst, prop_src, prop_storage))
594 override_apply =
nullptr;
600 override_apply =
nullptr;
605 if (override_apply ==
nullptr) {
613 override_apply =
nullptr;
616 if (override_apply ==
nullptr) {
619 "'%s' gives unmatching or nullptr RNA apply callbacks, should not happen (%d vs. %d)",
621 prop_dst->identifier.c_str(),
644 const bool success = override_apply(bmain, rnaapply_ctx);
650 if (type_a == type_b) {
653 if (
ELEM(
nullptr, type_a, type_b)) {
679 const char *root_path,
680 const size_t root_path_len,
687 bool matching =
true;
698#ifdef DEBUG_OVERRIDE_TIMEIT
699 static float _sum_time_global = 0.0f;
700 static float _num_time_global = 0.0f;
701 double _timeit_time_global;
702 static float _sum_time_diffing = 0.0f;
703 static float _delta_time_diffing = 0.0f;
704 static int _num_delta_time_diffing = 0.0f;
705 static float _num_time_diffing = 0.0f;
706 double _timeit_time_diffing;
709 _delta_time_diffing = 0.0f;
710 _num_delta_time_diffing = 0;
743 if (ptr_local->
type != ptr_reference->
type) {
750 reinterpret_cast<IDProperty *
>(rawprop_local)->name));
751 if (!rawprop_reference) {
811#define RNA_PATH_BUFFSIZE 8192
813 std::optional<std::string>
rna_path;
814 size_t rna_path_len = 0;
818 BLI_assert(strlen(root_path) == root_path_len);
824 char *rna_path_c = rna_path_buffer;
828 rna_path_len = root_path_len + 1 + prop_name_len;
833 memcpy(rna_path_c, root_path, root_path_len);
834 rna_path_c[root_path_len] =
'.';
835 memcpy(rna_path_c + root_path_len + 1, prop_name, prop_name_len);
836 rna_path_c[rna_path_len] =
'\0';
841 prop_name_esc, prop_name,
sizeof(prop_name_esc));
843 rna_path_len = root_path_len + 2 + prop_name_esc_len + 2;
848 memcpy(rna_path_c, root_path, root_path_len);
849 rna_path_c[root_path_len] =
'[';
850 rna_path_c[root_path_len + 1] =
'"';
851 memcpy(rna_path_c + root_path_len + 2, prop_name_esc, prop_name_esc_len);
852 rna_path_c[root_path_len + 2 + prop_name_esc_len] =
'"';
853 rna_path_c[root_path_len + 2 + prop_name_esc_len + 1] =
']';
854 rna_path_c[rna_path_len] =
'\0';
858 if (rna_path_c != rna_path_buffer) {
859 MEM_delete(rna_path_c);
875 if (ignore_overridden) {
884#ifdef DEBUG_OVERRIDE_TIMEIT
901#ifdef DEBUG_OVERRIDE_TIMEIT
904 _delta_time_diffing += _delta_time;
905 _num_delta_time_diffing++;
909 matching = matching &&
diff == 0;
910 if (r_report_flags) {
911 *r_report_flags = (*r_report_flags | report_flags);
934 if ((do_restore || do_tag_for_restore) &&
950 rnaapply_ctx.
ptr_dst = *ptr_local;
951 rnaapply_ctx.
ptr_src = *ptr_reference;
952 rnaapply_ctx.
prop_dst = rawprop_local;
953 rnaapply_ctx.
prop_src = rawprop_reference;
960 "Restored forbidden liboverride `%s` for override data '%s'",
963 if (r_report_flags) {
969 "Failed to restore forbidden liboverride `%s` for override data '%s'",
1003 "Tagging for restoration forbidden liboverride `%s` for override data '%s'",
1006 if (r_report_flags) {
1015 "We have differences between reference and "
1016 "overriding data on non-editable property.");
1026 if (!(do_create || do_restore || do_tag_for_restore)) {
1032#undef RNA_PATH_BUFFSIZE
1036#ifdef DEBUG_OVERRIDE_TIMEIT
1039 _sum_time_global += _delta_time;
1041 _sum_time_diffing += _delta_time_diffing;
1042 _num_time_diffing++;
1044 printf(
"time end (%s): %.6f\n", __func__, _delta_time);
1045 printf(
"time averaged (%s): %.6f (total: %.6f, in %d runs)\n",
1047 (_sum_time_global / _num_time_global),
1049 int(_num_time_global));
1050 printf(
"diffing time end (%s): %.6f (in %d runs)\n",
1052 _delta_time_diffing,
1053 _num_delta_time_diffing);
1054 printf(
"diffing time averaged (%s): %.6f (total: %.6f, in %d runs)\n",
1056 (_sum_time_diffing / _num_time_diffing),
1058 int(_num_time_diffing));
1071 bool changed =
false;
1073#ifdef DEBUG_OVERRIDE_TIMEIT
1089 if (ptr_storage && (ptr_storage->
owner_id !=
nullptr)) {
1106#ifdef DEBUG_OVERRIDE_TIMEIT
1114 const char *item_name,
1115 const int item_name_len,
1116 const bool do_id_pointer,
1117 const std::optional<ID *> &item_id,
1122 bool is_match =
false;
1124 if (do_id_pointer) {
1125 if (*item_id !=
static_cast<ID *
>(ptr_item_name->
data)) {
1138 ptr_item_name, nameprop, name_buf,
sizeof(name_buf), &namelen);
1140 is_match = ((item_name_len == namelen) &&
STREQ(item_name, name));
1142 if (name != name_buf) [[unlikely]] {
1152 const char *item_name,
1153 const int item_name_len,
1154 const bool do_id_pointer,
1155 const std::optional<ID *> &item_id,
1164 if (do_id_pointer) {
1174 item_name, item_name_len, do_id_pointer, item_id, &iter.
ptr))
1176 *r_ptr_item_name = iter.
ptr;
1184 *r_ptr_item_name = {};
1196 const char *item_name,
1197 const std::optional<ID *> &item_id,
1198 const int item_index,
1200 const bool ignore_index_only_lookup,
1209 const int item_name_len = item_name ? int(strlen(item_name)) : 0;
1216 if (item_index != -1) {
1218 if (item_name && r_ptr_item_index->
has_type()) {
1220 item_name, item_name_len, do_id_pointer, item_id, r_ptr_item_index))
1222 *r_ptr_item_name = *r_ptr_item_index;
1236 if (ignore_index_only_lookup) {
1242 ptr, prop, item_name, item_name_len, do_id_pointer, item_id, r_ptr_item_name))
1277 std::optional<ID *> subitem_local_id = use_id_pointer ? std::optional(opop->
subitem_local_id) :
1279 std::optional<ID *> subitem_reference_id = use_id_pointer ?
1285 if (prop_storage !=
nullptr) {
1297 const bool ignore_index_only_lookup = (subitem_local_id || subitem_reference_id);
1299 PointerRNA ptr_item_dst_name, ptr_item_dst_index;
1300 PointerRNA ptr_item_src_name, ptr_item_src_index;
1301 PointerRNA ptr_item_storage_name, ptr_item_storage_index;
1307 ignore_index_only_lookup,
1309 &ptr_item_src_index);
1313 subitem_reference_id,
1315 ignore_index_only_lookup,
1317 &ptr_item_dst_index);
1337 ignore_index_only_lookup,
1339 &ptr_item_dst_index);
1352 ignore_index_only_lookup,
1354 &ptr_item_dst_index);
1364 ignore_index_only_lookup,
1366 &ptr_item_src_index);
1374 ignore_index_only_lookup,
1376 &ptr_item_dst_index);
1384 ignore_index_only_lookup,
1386 &ptr_item_src_index);
1390 if (prop_storage !=
nullptr) {
1396 ignore_index_only_lookup,
1397 &ptr_item_storage_name,
1398 &ptr_item_storage_index);
1399 if (!ptr_item_storage_name) {
1403 subitem_reference_id,
1405 ignore_index_only_lookup,
1406 &ptr_item_storage_name,
1407 &ptr_item_storage_index);
1409 if (!ptr_item_storage_name && !ptr_item_storage_index) {
1415 ignore_index_only_lookup,
1416 &ptr_item_storage_name,
1417 &ptr_item_storage_index);
1427 *ptr_item_src = ptr_item_src_name;
1428 *ptr_item_dst = ptr_item_dst_name;
1429 if (prop_storage !=
nullptr) {
1430 *ptr_item_storage = ptr_item_storage_name;
1434 *ptr_item_src = ptr_item_src_index;
1435 *ptr_item_dst = ptr_item_dst_index;
1436 if (prop_storage !=
nullptr) {
1437 *ptr_item_storage = ptr_item_storage_index;
1449 "Failed to find destination sub-item '%s' (%d) of '%s' in new override data '%s'",
1460 "Failed to find source sub-item '%s' (%d) of '%s' in old override data '%s'",
1475 bmain, ptr_src,
nullptr,
nullptr);
1477 bmain, ptr_dst,
nullptr,
nullptr);
1499 (
ELEM(
nullptr, id_src, id_dst) ||
1509 (id_dst->
lib == id_src->
lib && id_dst != id_owner_dst)))
1516 "Local override %s detected as needing resync due to mismatch in its used IDs",
1517 id_owner_dst->
name);
1525 "Local override %s detected as needing resync as its liboverride reference is "
1526 "already tagged for resync",
1527 id_owner_dst->
name);
1535 const bool do_insert = rnaapply_ctx.
do_insert;
1557 "Failed to apply '%s' override operation on %s\n",
1592 "%s: Ignoring local override on ID pointer custom property '%s', as requested by "
1593 "RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS flag",
1603 bmain, &rnaapply_ctx.
ptr_src,
nullptr,
nullptr));
1605 bmain, &rnaapply_ctx.
ptr_dst,
nullptr,
nullptr));
1608 "%s: Ignoring local override on ID pointer property '%s', as requested by "
1609 "RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS flag",
1621 "%s: Ignoring all local override on ID pointer collection property '%s', as "
1622 "requested by RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS flag",
1641#ifdef DEBUG_OVERRIDE_TIMEIT
1649 bool do_insert =
false;
1650 for (
int i = 0; i < (do_restore_only ? 1 : 2); i++, do_insert =
true) {
1660 rnaapply_ctx.
flag = flag;
1678 "Failed to apply library override operation to '%s.%s' "
1679 "(could not resolve some properties, local: %d, override: %d)",
1691 if (id_ptr_storage && (id_ptr_storage->
owner_id !=
nullptr)) {
1710 bmain, &rnaapply_ctx.
ptr_src,
nullptr,
nullptr));
1712 bmain, &rnaapply_ctx.
ptr_dst,
nullptr,
nullptr));
1719 bmain, id_ptr_dst, id_ptr_src, &prop_ptr_dst, &prop_ptr_src);
1727 bmain, &rnaapply_ctx.
ptr_src,
nullptr,
nullptr));
1730 bmain, &rnaapply_ctx.
ptr_dst,
nullptr,
nullptr));
1761 ID *id_dst =
static_cast<ID *
>(id_ptr_dst->
data);
1762 ID *id_src =
static_cast<ID *
>(id_ptr_src->
data);
1769#ifdef DEBUG_OVERRIDE_TIMEIT
1779 std::optional<std::string>
rna_path;
1784 (*r_owner_id)->override_library,
rna_path->c_str());
1795 std::optional<std::string>
rna_path;
1797 if (r_created !=
nullptr) {
1804 id->override_library,
rna_path->c_str(), r_created);
1826 op,
nullptr,
nullptr, {}, {},
index,
index, strict, r_strict);
1839 if (r_created !=
nullptr) {
1850 op, operation,
nullptr,
nullptr, {}, {},
index,
index, strict, r_strict, r_created);
1861 return override_status;
1869 bmain, ptr, prop,
index,
false,
nullptr);
1870 if (opop !=
nullptr) {
1880 return override_status;
Utility defines for timing/benchmarks.
#define TIMEIT_START_AVERAGED(var)
#define TIMEIT_END_AVERAGED(var)
#define CLOG_ERROR(clg_ref,...)
#define CLOG_DEBUG(clg_ref,...)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
#define BLI_assert_unreachable()
#define UNUSED_VARS_NDEBUG(...)
#define BLI_assert_msg(a, msg)
const char * c_str() const
IMETHOD Vector diff(const Vector &a, const Vector &b, double dt)
VecBase< float, D > constexpr mod(VecOp< float, D >, VecOp< float, D >) RET
char * RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)
@ RNA_OVERRIDE_MATCH_RESULT_RESTORED
@ RNA_OVERRIDE_MATCH_RESULT_CREATED
@ RNA_OVERRIDE_MATCH_RESULT_RESTORE_TAGGED
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void BKE_lib_override_library_tag_set(IDOverrideLibrary &liboverride, IDOverrideLibraryTag tag, bool value)
bool RNA_property_overridable_library_set(PointerRNA *, PropertyRNA *prop, const bool is_overridable)
static bool rna_property_override_collection_subitem_name_id_lookup(PointerRNA *ptr, PropertyRNA *prop, const char *item_name, const int item_name_len, const bool do_id_pointer, const std::optional< ID * > &item_id, PointerRNA *r_ptr_item_name)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
@ NLATRACK_OVERRIDELIBRARY_LOCAL
static void rna_property_override_apply_ex(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx)
@ LIBRARY_TAG_RESYNC_REQUIRED
bool(*)(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) RNAPropOverrideStore
IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_find(IDOverrideLibraryProperty *liboverride_property, const char *subitem_refname, const char *subitem_locname, const std::optional< const ID * > &subitem_refid, const std::optional< const ID * > &subitem_locid, int subitem_refindex, int subitem_locindex, bool strict, bool *r_strict)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
@ STRUCT_PUBLIC_NAMESPACE
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool BKE_lib_override_library_property_operation_operands_validate(IDOverrideLibraryPropertyOperation *liboverride_property_operation, PointerRNA *ptr_dst, PointerRNA *ptr_src, PointerRNA *ptr_storage, PropertyRNA *prop_dst, PropertyRNA *prop_src, PropertyRNA *prop_storage)
bool RNA_property_editable_flag(const PointerRNA *ptr, PropertyRNA *prop)
std::optional< std::string > RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
void BKE_pose_ensure(Main *bmain, Object *ob, bArmature *arm, bool do_id_user)
bool rna_struct_override_type_matches(const StructRNA *type_a, const StructRNA *type_b)
@ RNA_OVERRIDE_APPLY_FLAG_SKIP_RESYNC_CHECK
@ RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS
@ RNA_OVERRIDE_APPLY_FLAG_RESTORE_ONLY
static bool rna_property_override_operation_store(Main *bmain, PointerRNA *ptr_local, PointerRNA *ptr_reference, PointerRNA *ptr_storage, PropertyRNA *prop_local, PropertyRNA *prop_reference, PropertyRNA *prop_storage, IDOverrideLibraryProperty *op)
IDOverrideLibraryPropertyOperation * RNA_property_override_property_operation_get(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, const eID_OverrideLib_Op operation, const int index, const bool strict, bool *r_strict, bool *r_created)
bool RNA_struct_equals(Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, eRNACompareMode mode)
@ LIBOVERRIDE_PROP_TAG_NEEDS_RETORE
@ LIBOVERRIDE_PROP_OP_TAG_UNUSED
std::optional< AncestorPointerRNA > RNA_struct_search_closest_ancestor_by_type(const PointerRNA *ptr, const StructRNA *srna)
void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, CollectionPropertyIterator *iter)
bool RNA_property_overridable_get(const PointerRNA *ptr, PropertyRNA *prop)
static void rna_property_override_check_resync(Main *bmain, PointerRNA *ptr_dst, PointerRNA *ptr_src, PointerRNA *ptr_item_dst, PointerRNA *ptr_item_src)
int RNA_property_override_flag(PropertyRNA *prop)
ID * RNA_find_real_ID_and_path(ID *id, const char **r_path)
@ RNA_OVERRIDE_COMPARE_IGNORE_NON_OVERRIDABLE
@ RNA_OVERRIDE_COMPARE_RESTORE
@ RNA_OVERRIDE_COMPARE_TAG_FOR_RESTORE
@ RNA_OVERRIDE_COMPARE_CREATE
@ RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN
PropertyRNA * RNA_struct_iterator_property(StructRNA *type)
static bool rna_property_override_definition_matches(const PropertyRNA &a, const PropertyRNA &b)
bool RNA_property_comparable(PointerRNA *, PropertyRNA *prop)
@ LIBOVERRIDE_OP_INSERT_AFTER
@ LIBOVERRIDE_OP_SUBTRACT
@ LIBOVERRIDE_OP_MULTIPLY
@ LIBOVERRIDE_OP_INSERT_BEFORE
@ LIBOVERRIDE_FLAG_NO_HIERARCHY
void RNA_struct_override_apply(Main *bmain, PointerRNA *id_ptr_dst, PointerRNA *id_ptr_src, PointerRNA *id_ptr_storage, IDOverrideLibrary *liboverride, const eRNAOverrideApplyFlag flag)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
@ PROPOVERRIDE_NO_COMPARISON
@ RNA_EQ_UNSET_MATCH_NONE
void rna_property_override_diff_default(Main *bmain, RNAPropertyOverrideDiffContext &rnadiff_ctx)
PropertyType RNA_property_type(PropertyRNA *prop)
static bool override_apply_property_check_skip(Main *bmain, PointerRNA *id_ptr_dst, PointerRNA *id_ptr_src, RNAPropertyOverrideApplyContext &rnaapply_ctx)
const IDTypeInfo * BKE_idtype_get_info_from_id(const ID *id)
bool RNA_path_resolve_property_and_item_pointer(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, PointerRNA *r_item_ptr)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
@ IDP_FLAG_OVERRIDABLE_LIBRARY
@ CAM_BGIMG_FLAG_OVERRIDE_LIBRARY_LOCAL
void RNA_property_collection_end(CollectionPropertyIterator *iter)
static bool rna_property_override_collection_subitem_name_id_match(const char *item_name, const int item_name_len, const bool do_id_pointer, const std::optional< ID * > &item_id, PointerRNA *ptr_item_name)
char char size_t BLI_str_escape(char *__restrict dst, StringRef src, size_t dst_maxncpy) ATTR_NONNULL(1)
void BKE_lib_override_library_operations_tag(IDOverrideLibraryProperty *liboverride_property, eID_OverrideLib_PropTag tag, bool do_set)
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)
bool RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr)
IDOverrideLibraryProperty * RNA_property_override_property_find(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, ID **r_owner_id)
IDOverrideLibraryProperty * BKE_lib_override_library_property_find(IDOverrideLibrary *liboverride, const char *rna_path)
eRNAOverrideStatus RNA_property_override_library_status(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, const int index)
bool RNA_property_overridden(PointerRNA *ptr, PropertyRNA *prop)
static void rna_property_override_collection_subitem_lookup(RNAPropertyOverrideApplyContext &rnaapply_ctx)
bool RNA_struct_is_ID(const StructRNA *type)
void RNA_property_collection_next(CollectionPropertyIterator *iter)
static bool rna_property_override_operation_apply(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx)
static int rna_property_override_diff(Main *bmain, PropertyRNAOrID *prop_a, PropertyRNAOrID *prop_b, const char *rna_path, const size_t rna_path_len, eRNACompareMode mode, IDOverrideLibrary *liboverride, const eRNAOverrideMatch flags, eRNAOverrideMatchResult *r_report_flags)
IDOverrideLibraryProperty * RNA_property_override_property_get(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, bool *r_created)
IDOverrideLibraryProperty * BKE_lib_override_library_property_get(IDOverrideLibrary *liboverride, const char *rna_path, bool *r_created)
static ID * rna_property_override_property_real_id_owner(Main *, PointerRNA *ptr, PropertyRNA *prop, std::optional< std::string > *r_rna_path)
ID_Type GS(const char *name)
void(*)(Main *bmain, RNAPropertyOverrideDiffContext &rnadiff_ctx) RNAPropOverrideDiff
@ ID_TAG_LIBOVERRIDE_NEED_RESYNC
@ eModifierFlag_OverrideLibrary_Local
bool RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
IDOverrideLibraryPropertyOperation * RNA_property_override_property_operation_find(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, const int index, const bool strict, bool *r_strict)
bool RNA_property_editable(const PointerRNA *ptr, PropertyRNA *prop)
double BLI_time_now_seconds()
PropertyRNA * rna_ensure_property(PropertyRNA *prop)
@ ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE
@ BONE_COLLECTION_OVERRIDE_LIBRARY_LOCAL
bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop)
bool(*)(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx) RNAPropOverrideApply
IDProperty * rna_idproperty_find(PointerRNA *ptr, const char *name)
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)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
bool RNA_struct_in_public_namespace(const StructRNA *type)
IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_get(IDOverrideLibraryProperty *liboverride_property, eID_OverrideLib_Op 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)
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_ITEM_USE_ID
@ LIBOVERRIDE_OP_FLAG_MANDATORY
@ LIBOVERRIDE_OP_FLAG_LOCKED
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE
bool RNA_struct_override_store(Main *bmain, PointerRNA *ptr_local, PointerRNA *ptr_reference, PointerRNA *ptr_storage, IDOverrideLibrary *liboverride)
void rna_property_rna_or_id_get(PropertyRNA *prop, PointerRNA *ptr, PropertyRNAOrID *r_prop_rna_or_id)
bool rna_property_override_apply_default(Main *bmain, RNAPropertyOverrideApplyContext &rnaapply_ctx)
@ CONSTRAINT_OVERRIDE_LIBRARY_LOCAL
static void rna_property_override_collection_subitem_name_index_lookup(PointerRNA *ptr, PropertyRNA *prop, const char *item_name, const std::optional< ID * > &item_id, const int item_index, const bool ignore_index_only_lookup, PointerRNA *r_ptr_item_name, PointerRNA *r_ptr_item_index)
bool RNA_property_copy(Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index, IDOverrideLibraryProperty *removed_oprop, IDOverrideLibraryPropertyOperation *removed_opop)
bool RNA_property_equals(Main *bmain, PointerRNA *ptr_a, PointerRNA *ptr_b, PropertyRNA *prop, eRNACompareMode mode)
#define RNA_PATH_BUFFSIZE
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eBoneCollection_Flag flags
eCamera_BGImage_Flag flag
char * subitem_reference_name
eID_OverrideLib_OpFlag flag
eID_OverrideLib_Op operation
struct ID * subitem_local_id
struct ID * subitem_reference_id
int subitem_reference_index
eID_OverrideLib_PropTag tag
char * subitem_local_name
ListBaseT< IDOverrideLibraryPropertyOperation > operations
unsigned int rna_prop_type
eID_OverrideLib_PropTag tag
eID_OverrideLib_Flag flag
IDTypeLibOverrideApplyPost lib_override_apply_post
IDOverrideLibrary * override_library
bke::library::LibraryRuntime * runtime
RNAPropOverrideDiff override_diff
RNAPropOverrideApply override_apply
unsigned int arraydimension
PropArrayLengthGetFunc getlength
unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION]
PropertyOverrideFlag flag_override
RNAPropOverrideStore override_store
IDOverrideLibrary * liboverride
IDOverrideLibraryPropertyOperation * liboverride_removed_operation
IDOverrideLibraryPropertyOperation * liboverride_operation
PointerRNA ptr_item_storage
IDOverrideLibraryProperty * liboverride_property
IDOverrideLibraryProperty * liboverride_removed_property
PropertyRNA * prop_storage
eRNAOverrideApplyFlag flag
eRNAOverrideMatchResult report_flag
eRNAOverrideMatch liboverride_flags
IDOverrideLibrary * liboverride
PropertyRNA * nameproperty