67#include "RNA_prototypes.hh"
76#ifdef DEBUG_OVERRIDE_TIMEIT
134 const ID **r_owner_id)
138 BLI_assert_msg(owner_id !=
nullptr,
"Liboverride-embedded ID with no owner");
139 if (r_owner_id !=
nullptr) {
140 *r_owner_id = owner_id;
145 if (r_owner_id !=
nullptr) {
148 return id->override_library;
160 const_cast<const ID *
>(
id),
161 const_cast<const ID *
>(owner_id_hint),
162 const_cast<const ID **
>(r_owner_id)));
220 op_dst = op_dst->
next, op_src = op_src->
next)
253 if ((*liboverride)->runtime !=
nullptr) {
254 if ((*liboverride)->runtime->rna_path_to_override_properties !=
nullptr) {
255 BLI_ghash_free((*liboverride)->runtime->rna_path_to_override_properties,
nullptr,
nullptr);
268 const int lib_id_copy_flags)
279 if (local_id ==
nullptr) {
315 if (reference_key !=
nullptr) {
359 const ID *override_owner_id;
370 const int rnaprop_index)
373 if (anim_data !=
nullptr) {
375 char *index_token_start =
const_cast<char *
>(
377 if (index_token_start !=
nullptr) {
378 const char index_token_start_backup = *index_token_start;
379 *index_token_start =
'\0';
381 anim_data, liboverride_prop->
rna_path, rnaprop_index,
nullptr,
nullptr);
382 *index_token_start = index_token_start_backup;
386 anim_data, liboverride_prop->
rna_path, 0,
nullptr,
nullptr);
388 if (fcurve !=
nullptr) {
441 const bool do_tagged_remap)
454 if (do_tagged_remap) {
456 Key *local_key =
nullptr;
457 if (reference_key !=
nullptr) {
472 if (reference_key !=
nullptr) {
497 id =
reinterpret_cast<Key *
>(id_iter)->from;
501 id->override_library->hierarchy_root == id_hierarchy_root)
503 id->override_library->reference->newid =
id;
506 if (reference_key !=
nullptr) {
507 reference_key->
id.
newid = id_iter;
519 id_remapper.
add(reference_id, local_id);
522 Key *local_key =
nullptr;
523 if (reference_key !=
nullptr) {
524 if (reference_id->
newid !=
nullptr) {
529 id_remapper.
add(&reference_key->
id, &local_key->
id);
535 const ID *id_root_reference,
536 ID *id_hierarchy_root,
537 const ID *id_hierarchy_root_reference,
538 const bool do_no_main,
539 const bool do_fully_editable)
547 BLI_assert(id_hierarchy_root !=
nullptr || id_hierarchy_root_reference !=
nullptr ||
551 BLI_assert(
ELEM(
nullptr, id_hierarchy_root, id_hierarchy_root_reference));
553 if (id_hierarchy_root !=
nullptr) {
566 if (!
ELEM(id_hierarchy_root_reference,
nullptr, id_root_reference)) {
573 const Library *reference_library = id_root_reference->
lib;
583 if ((reference_id->
tag &
ID_TAG_DOIT) != 0 && reference_id->
lib == reference_library &&
587 todo_id_iter->
data = reference_id;
594 for (todo_id_iter =
static_cast<LinkData *
>(todo_ids.
first); todo_id_iter !=
nullptr;
595 todo_id_iter = todo_id_iter->
next)
597 reference_id =
static_cast<ID *
>(todo_id_iter->
data);
601 if (reference_id->
newid ==
nullptr) {
607 if (reference_id->
newid ==
nullptr) {
611 if (do_fully_editable) {
619 if (reference_key !=
nullptr) {
624 reference_key->
id.
newid = &local_key->
id;
636 const bool do_remap_liboverride_hierarchy_only = (id_hierarchy_root !=
nullptr && !do_no_main);
638 if (id_hierarchy_root_reference !=
nullptr) {
639 id_hierarchy_root = id_hierarchy_root_reference->
newid;
641 else if (id_root_reference->
newid !=
nullptr &&
642 (id_hierarchy_root ==
nullptr ||
645 id_hierarchy_root = id_root_reference->
newid;
658 if (do_no_main &&
id->lib == id_root_reference->
lib &&
id->newid !=
nullptr) {
659 other_id =
id->
newid;
665 other_id->
lib =
nullptr;
679 if (!do_remap_liboverride_hierarchy_only ||
683 relinked_ids.
append(other_id);
690 ID *local_id = reference_id->
newid;
691 if (other_id == local_id) {
696 if (other_id !=
id) {
697 other_id->
lib = id_root_reference->
lib;
702 for (todo_id_iter =
static_cast<LinkData *
>(todo_ids.
first); todo_id_iter !=
nullptr;
703 todo_id_iter = todo_id_iter->
next)
705 reference_id =
static_cast<ID *
>(todo_id_iter->
data);
706 ID *local_id = reference_id->
newid;
708 if (local_id ==
nullptr) {
723 relinked_ids.
clear();
727 for (todo_id_iter =
static_cast<LinkData *
>(todo_ids.
first); todo_id_iter !=
nullptr;
728 todo_id_iter = todo_id_iter->
next)
730 reference_id =
static_cast<ID *
>(todo_id_iter->
data);
732 reference_id->
newid =
nullptr;
814 else if (is_missing) {
827 else if (is_missing) {
864 Object *ob = collection_object->ob;
872 reinterpret_cast<void ***
>(&collections_linkedlist_p)))
874 *collections_linkedlist_p =
static_cast<LinkNodePair *
>(
892 if (
data->scene !=
nullptr) {
894 data,
data->scene->master_collection);
923 const bool check_override)
926 if (
ELEM(other_id,
nullptr, owner_id)) {
930 if (other_id->
lib != owner_id->
lib) {
934 if (check_override) {
937 "When processing liboverrides, the owner ID should always be a liboverride too here.");
949#define HIERARCHY_BREAKING_ID_TYPES ID_SCE, ID_LI, ID_SCR, ID_WM, ID_WS
955#undef HIERARCHY_BREAKING_ID_TYPES
963 ID *
id =
data->root_get();
964 const bool is_override =
data->is_override;
966 if ((*
reinterpret_cast<uint *
>(&
id->tag) &
data->tag) == 0) {
984 from_id_entry = from_id_entry->
next)
989 ID *from_id = from_id_entry->id_pointer.from;
995 data->root_set(from_id);
1010 ID *
id =
data->root_get();
1011 const bool is_override =
data->is_override;
1012 const bool is_resync =
data->is_resync;
1020 return (*
reinterpret_cast<uint *
>(&
id->tag) &
data->tag) != 0;
1027 to_id_entry = to_id_entry->
next)
1032 ID *to_id = *to_id_entry->id_pointer.to;
1037 data->root_set(to_id);
1039 id->tag |=
data->tag;
1049 if ((*
reinterpret_cast<uint *
>(&
id->tag) &
data->tag) != 0 && !is_resync) {
1053 return (*
reinterpret_cast<uint *
>(&
id->tag) &
data->tag) != 0;
1059 ID *id_owner =
data->root_get();
1076 to_id_entry = to_id_entry->
next)
1081 ID *to_id = *to_id_entry->id_pointer.to;
1094 data->linked_ids_hierarchy_default_override.contains(to_id))
1098 data->root_set(to_id);
1103 data->root_set(id_owner);
1115 collection_object !=
nullptr;
1116 collection_object = collection_object->
next)
1118 Object *
object = collection_object->ob;
1119 if (
object ==
nullptr) {
1123 data->linked_ids_hierarchy_default_override.contains(&
object->id))
1131 collection_child !=
nullptr;
1132 collection_child = collection_child->
next)
1135 data, collection_child->collection))
1147 ID *id_root =
data->root_get();
1152 if (ob->id.lib != id_root->
lib) {
1155 if (ob->type ==
OB_ARMATURE && ob->pose !=
nullptr &&
1156 ((ob->id.tag &
data->tag) ||
1157 data->linked_ids_hierarchy_default_override.contains(&ob->id)))
1161 pchan = pchan->
next)
1163 if (pchan->custom !=
nullptr && &pchan->custom->id != id_root) {
1164 data->id_tag_clear(&pchan->custom->id,
bool(pchan->custom->id.tag &
ID_TAG_MISSING));
1173 if (!((collection->id.tag &
data->tag) != 0 ||
1174 data->linked_ids_hierarchy_default_override.contains(&collection->id)) ||
1175 &collection->id == id_root || collection->id.
lib != id_root->
lib)
1200 ID *id_root =
data->root_get();
1201 ID *hierarchy_root_id =
data->hierarchy_root_get();
1202 const bool is_resync =
data->is_resync;
1206 id_root->
tag |=
data->missing_tag;
1219 const bool use_linked_overrides_set = hierarchy_root_id &&
1220 hierarchy_root_id->
lib == id_root->
lib &&
1221 hierarchy_root_id != id_root;
1224 if (use_linked_overrides_set) {
1225 BLI_assert(
data->linked_ids_hierarchy_default_override.is_empty());
1226 data->linked_ids_hierarchy_default_override.add(id_root);
1227 data->linked_ids_hierarchy_default_override.add(hierarchy_root_id);
1228 data->do_create_linked_overrides_set =
true;
1231 data->root_set(hierarchy_root_id);
1238 data->root_set(id_root);
1239 data->do_create_linked_overrides_set =
false;
1249 if (use_linked_overrides_set) {
1250 data->linked_ids_hierarchy_default_override.clear();
1275 Collection *instantiating_collection =
nullptr;
1276 Collection *instantiating_collection_override_candidate =
nullptr;
1281 if (instantiating_collection_linklist !=
nullptr) {
1282 for (
LinkNode *instantiating_collection_linknode = instantiating_collection_linklist->
list;
1283 instantiating_collection_linknode !=
nullptr;
1284 instantiating_collection_linknode = instantiating_collection_linknode->
next)
1286 instantiating_collection =
static_cast<Collection *
>(
1287 instantiating_collection_linknode->link);
1293 if (instantiating_collection->
id.
tag &
data->tag ||
1294 data->linked_ids_hierarchy_default_override.contains(&instantiating_collection->
id))
1300 instantiating_collection_override_candidate = instantiating_collection;
1301 instantiating_collection =
nullptr;
1305 if (instantiating_collection ==
nullptr &&
1306 instantiating_collection_override_candidate !=
nullptr)
1309 &instantiating_collection_override_candidate->
id,
1319 ID *id_owner =
data->root_get();
1324 ID *id_hierarchy_root =
data->hierarchy_root_get();
1345 to_id_entry = to_id_entry->
next)
1350 ID *to_id = *to_id_entry->id_pointer.to;
1362 const Library *reference_lib =
1364 const ID *to_id_reference =
1366 if (to_id_reference->
lib != reference_lib) {
1374 data->root_set(to_id);
1377 data->root_set(id_owner);
1383 ID *id_root =
data->root_get();
1388 ID *id_hierarchy_root =
data->hierarchy_root_get();
1402 ID *id_root_reference,
1403 ID *id_hierarchy_root_reference,
1404 const bool do_fully_editable)
1412 data.is_override =
false;
1413 data.is_resync =
false;
1415 data.root_set(id_root_reference);
1416 data.hierarchy_root_set(id_hierarchy_root_reference);
1427 if (id_hierarchy_root_reference->
lib != id_root_reference->
lib) {
1430 id_root_reference->
lib);
1433 data.is_override =
true;
1434 data.root_set(id_hierarchy_root_reference);
1435 data.hierarchy_root_set(id_hierarchy_root_reference);
1442 bool success =
false;
1443 if (id_hierarchy_root_reference->
lib != id_root_reference->
lib) {
1447 id_hierarchy_root_reference,
1457 id_hierarchy_root_reference,
1474 ID *id_instance_hint,
1476 const Object *old_active_object,
1477 const bool is_resync)
1480 BLI_assert(old_active_object ==
nullptr || view_layer !=
nullptr);
1496 if (is_resync || id_root ==
nullptr || id_root->
newid ==
nullptr) {
1515 switch (
GS(id_root->
name)) {
1517 Object *ob_reference = id_instance_hint !=
nullptr &&
GS(id_instance_hint->
name) ==
ID_OB ?
1518 reinterpret_cast<Object *
>(id_instance_hint) :
1524 if (ob_reference !=
nullptr) {
1527 else if (id_instance_hint !=
nullptr) {
1530 bmain, scene, (
reinterpret_cast<Collection *
>(id_instance_hint)), collection_new);
1534 bmain, scene, (
reinterpret_cast<Collection *
>(id_root)), collection_new);
1546 bmain, scene,
reinterpret_cast<Object *
>(id_root), ob_new);
1556 if (view_layer !=
nullptr) {
1564 Collection *default_instantiating_collection = residual_storage;
1566 Object *ob_new =
reinterpret_cast<Object *
>(ob->id.newid);
1567 if (ob_new ==
nullptr || (
ID_IS_LINKED(ob_new) && ob_new->
id.
lib != owner_library)) {
1574 if (old_active_object == ob) {
1580 if (basact !=
nullptr) {
1581 view_layer->
basact = basact;
1587 if (id_root !=
nullptr && default_instantiating_collection ==
nullptr) {
1588 ID *id_ref = id_root->
newid !=
nullptr ? id_root->
newid : id_root;
1589 switch (
GS(id_ref->
name)) {
1614 (view_layer !=
nullptr ?
1619 default_instantiating_collection = collection;
1628 if (default_instantiating_collection ==
nullptr) {
1637 if (id_root !=
nullptr &&
1640 ID *id_ref = id_root->
newid !=
nullptr ? id_root->
newid : id_root;
1641 switch (
GS(id_ref->
name)) {
1646 default_instantiating_collection);
1651 bmain, scene,
nullptr, default_instantiating_collection);
1663 ID *id_root_reference,
1664 ID *id_hierarchy_root_reference,
1665 ID *id_instance_hint,
1666 ID **r_id_root_override,
1667 const bool do_fully_editable)
1669 if (r_id_root_override !=
nullptr) {
1670 *r_id_root_override =
nullptr;
1673 if (id_hierarchy_root_reference ==
nullptr) {
1674 id_hierarchy_root_reference = id_root_reference;
1681 const Object *old_active_object = (view_layer !=
nullptr) ?
1689 id_hierarchy_root_reference,
1696 if (r_id_root_override !=
nullptr) {
1697 *r_id_root_override = id_root_reference->
newid;
1722 if (curr_level > 1000) {
1724 "Levels of dependency relationships between library overrides IDs is way too high, "
1725 "skipping further processing loops (involves at least '%s')",
1742 *r_best_level = curr_level;
1743 return id->override_library->hierarchy_root;
1748 int best_level_placeholder = 0;
1762 int best_level_candidate = curr_level;
1763 ID *best_root_id_candidate =
id;
1766 from_id_entry = from_id_entry->
next)
1771 ID *from_id = from_id_entry->id_pointer.from;
1776 int level_candidate = curr_level + 1;
1779 bmain, from_id, curr_level + 1, &level_candidate);
1780 if (level_candidate > best_level_candidate && root_id_candidate !=
nullptr) {
1781 best_root_id_candidate = root_id_candidate;
1782 best_level_candidate = level_candidate;
1789 int best_level_placeholder = 0;
1792 bmain, id_owner, curr_level + 1, &best_level_placeholder);
1795 BLI_assert(best_root_id_candidate !=
nullptr);
1803 *r_best_level = best_level_candidate;
1804 return best_root_id_candidate;
1823 if (id_root ==
id) {
1829 ID *id_iter = ancestors[
i];
1836 from_id_entry = from_id_entry->
next)
1841 ID *from_id = from_id_entry->id_pointer.from;
1846 if (from_id == id_root) {
1850 ancestors.
add(from_id);
1865 if (
id->override_library->hierarchy_root == id_root) {
1873 if (
id->override_library->hierarchy_root !=
nullptr) {
1883 "Inconsistency in library override hierarchy of ID '%s'.\n"
1884 "\tNot enough data to verify validity of current proposed root '%s', assuming "
1885 "already set one '%s' is valid.",
1888 id->override_library->hierarchy_root->name);
1898 bool do_replace_root = (!
id->override_library->hierarchy_root ||
1900 id->override_library->hierarchy_root->lib !=
id->lib);
1902 from_id_entry = from_id_entry->
next)
1909 if (id_from_ref == from_id_entry->id_pointer.from) {
1912 do_replace_root =
true;
1915 "Inconsistency in library override hierarchy of ID '%s'.\n"
1916 "\tCurrent proposed root '%s' detected as valid, will replace already set one '%s'.",
1919 id->override_library->hierarchy_root->name);
1924 if (!do_replace_root) {
1927 "Inconsistency in library override hierarchy of ID '%s'.\n"
1928 "\tCurrent proposed root '%s' not detected as valid, keeping already set one '%s'.",
1931 id->override_library->hierarchy_root->name);
1937 "Modifying library override hierarchy of ID '%s'.\n"
1938 "\tFrom old root '%s' to new root '%s'.",
1940 id->override_library->hierarchy_root ?
id->override_library->hierarchy_root->name :
1944 id->override_library->hierarchy_root = id_root;
1952 to_id_entry = to_id_entry->
next)
1957 ID *to_id = *to_id_entry->id_pointer.to;
1973 if (
id->override_library->hierarchy_root !=
nullptr) {
1975 id->override_library->hierarchy_root->lib !=
id->lib)
1979 "Existing override hierarchy root ('%s') for ID '%s' is invalid, will try to find a "
1981 id->override_library->hierarchy_root !=
nullptr ?
1982 id->override_library->hierarchy_root->name :
1985 id->override_library->hierarchy_root =
nullptr;
1994 "Existing override hierarchy root ('%s') for ID '%s' is invalid, will try to find a "
1996 id->override_library->hierarchy_root !=
nullptr ?
1997 id->override_library->hierarchy_root->name :
2000 id->override_library->hierarchy_root =
nullptr;
2004 processed_ids.
add(
id);
2015 if (!
ELEM(
id->override_library->hierarchy_root, id_root,
nullptr)) {
2019 "Potential inconsistency in library override hierarchy of ID '%s' (current root "
2020 "%s), detected as part of the hierarchy of '%s' (current root '%s')",
2022 id->override_library->hierarchy_root !=
nullptr ?
2023 id->override_library->hierarchy_root->name :
2029 processed_ids.
add(
id);
2035 BLI_assert(
id->override_library->hierarchy_root !=
nullptr);
2047 processed_ids.
add(
id);
2060 const ID *id_root_reference,
2062 GHash *linkedref_to_old_override)
2076 for (
auto [id_reference, id_override_new] : references_and_new_overrides) {
2077 new_overrides.
append(id_override_new);
2078 ID *id_override_old =
static_cast<ID *
>(
2080 if (id_override_old ==
nullptr) {
2083 remapper_overrides_old_to_new.
add(id_override_old, id_override_new);
2087 GHASH_ITER (linkedref_to_old_override_iter, linkedref_to_old_override) {
2089 ID *id_override_old_iter =
static_cast<ID *
>(
2092 nomain_ids.
append(id_override_old_iter);
2096 ID *id_reference_iter =
static_cast<ID *
>(
2108 if (!id_reference_iter->
newid) {
2109 remapper_overrides_reference_to_old.
add(id_reference_iter, id_override_old_iter);
2118 remapper_overrides_old_to_new,
2124 remapper_overrides_reference_to_old,
2151 std::map<LibOverrideMissingIDsData_Key, LibOverrideMissingIDsData_Value>;
2162 std::string id_name_key(
id->name);
2163 const size_t last_key_index = id_name_key.find_last_not_of(
"0123456789");
2165 BLI_assert(last_key_index != std::string::npos);
2167 if (id_name_key[last_key_index] ==
'.') {
2168 id_name_key.resize(last_key_index);
2175 Main *bmain,
const bool is_relocate)
2185 if ((id_iter->
tag & required_tags) != required_tags) {
2194 if ((id_iter->
tag & required_tags) != required_tags) {
2200 std::pair<LibOverrideMissingIDsData::iterator, bool> value = missing_ids.try_emplace(
2202 value.first->second.push_back(id_iter);
2213 const LibOverrideMissingIDsData::iterator value = missing_ids.find(key);
2214 if (value == missing_ids.end()) {
2217 if (value->second.empty()) {
2220 ID *match_id = value->second.front();
2221 value->second.pop_front();
2233 Collection *override_resync_residual_storage,
2234 const bool do_hierarchy_enforce,
2235 const bool do_post_process,
2243 const Object *old_active_object =
nullptr;
2255 "Impossible to resync data-block %s and its dependencies, as its linked reference "
2267 data.is_override =
true;
2268 data.is_resync =
true;
2270 data.root_set(id_root);
2282 for (
LinkNode *resync_root_link = id_resync_roots; resync_root_link !=
nullptr;
2283 resync_root_link = resync_root_link->
next)
2285 ID *id_resync_root =
static_cast<ID *
>(resync_root_link->link);
2290 "While dealing with root '%s', resync root ID '%s' (%p) found to be alreaady "
2293 id_resync_root->
name,
2307 reports !=
nullptr ? reports->
reports :
nullptr,
2309 "Impossible to resync data-block %s and its dependencies, as its linked reference "
2320 data.is_override =
true;
2321 data.root_set(id_resync_root);
2326 data.is_override =
false;
2328 data.hierarchy_root_set(
2358 bmain,
id,
nullptr,
nullptr);
2364 ID *reference_id = id_override_library->
reference;
2365 if (
GS(reference_id->
name) !=
GS(
id->name)) {
2366 switch (
GS(
id->name)) {
2372 reference_id =
reinterpret_cast<ID *
>(
2382 if (reference_id ==
nullptr) {
2394 if ((
id->override_library->reference->tag &
ID_TAG_DOIT) == 0) {
2399 id->override_library->reference->tag |=
ID_TAG_DOIT;
2413 data.is_override =
true;
2414 data.root_set(id_root);
2442 Library *id_root_reference_lib_old = (new_to_old_libraries_map ?
2444 id_root_reference->
lib, id_root_reference->
lib) :
2445 id_root_reference->
lib);
2446 const bool is_relocate = id_root_reference_lib_old != id_root_reference->
lib;
2451 bmain, is_relocate);
2457 ID *id_reference_iter;
2460 !
ELEM(id_reference_iter->
lib, id_root_reference->
lib, id_root_reference_lib_old))
2464 ID *id_override_new = id_reference_iter->
newid;
2465 references_and_new_overrides.
append(std::make_pair(id_reference_iter, id_override_new));
2467 ID *id_override_old =
static_cast<ID *
>(
2476 id_reference_iter->
lib);
2477 BLI_assert(id_override_old ==
nullptr || id_override_old->
lib == id_root->
lib);
2478 id_override_new->
lib = id_root->
lib;
2485 if (id_override_old ==
nullptr && (
ID_IS_LINKED(id_override_new) || is_relocate)) {
2488 BLI_assert(id_override_old ==
nullptr || id_override_old->
lib == id_override_new->
lib);
2489 if (id_override_old !=
nullptr) {
2490 BLI_ghash_insert(linkedref_to_old_override, id_reference_iter, id_override_old);
2494 if (key_reference_iter && key_override_old) {
2496 linkedref_to_old_override, &key_reference_iter->
id, &key_override_old->
id);
2500 "Found missing linked old override best-match %s for new linked override %s",
2501 id_override_old->
name,
2502 id_override_new->
name);
2511 if (id_override_old !=
nullptr) {
2514 memcpy(id_name_buf, id_override_old->
name,
sizeof(id_name_buf));
2515 memcpy(id_override_old->
name, id_override_new->
name,
sizeof(id_override_old->
name));
2516 memcpy(id_override_new->
name, id_name_buf,
sizeof(id_override_new->
name));
2546 for (; op_new; op_new = op_new->
next, op_old = op_old->
next) {
2572 bmain, id_root_reference, references_and_new_overrides, linkedref_to_old_override);
2587 ID *id_override_new =
id->
newid;
2593 if (id_override_old ==
nullptr) {
2606 if (key_override_old_p !=
nullptr && *key_override_old_p !=
nullptr) {
2610 Key *key_override_old =
static_cast<Key *
>(
2613 *key_override_old_p = key_override_old;
2629 bool do_clear_parenting_override =
false;
2631 Object *ob_old =
reinterpret_cast<Object *
>(id_override_old);
2632 Object *ob_new =
reinterpret_cast<Object *
>(id_override_new);
2642 do_clear_parenting_override =
true;
2662 else if (do_clear_parenting_override) {
2663 if (strstr(op->rna_path,
"matrix_parent_inverse") ||
2664 strstr(op->rna_path,
"parent_type") || strstr(op->rna_path,
"parent_bone") ||
2665 strstr(op->rna_path,
"parent_vertices"))
2668 "Deleting liboverride property '%s' from object %s, as its parent pointer "
2669 "matches the reference data hierarchy wise",
2670 id_override_new->
name + 2,
2687 if (key_override_old_p !=
nullptr) {
2688 *key_override_old_p =
nullptr;
2692 id_override_old_vector.
append(id_override_old);
2701 id_override_old_vector,
2705 for (
ID *id_override_old : id_override_old_vector) {
2708 id_override_old_vector.
clear();
2713 int user_edited_overrides_deletion_count = 0;
2722 if (
id->newid !=
nullptr &&
id->lib == id_root_reference->
lib) {
2725 if (id_override_old !=
nullptr) {
2733 id_override_old_vector.
append(id_override_old);
2749 else if (hierarchy_root !=
nullptr &&
2769 "Old override %s is being kept around as it was user-edited",
2778 "Old override %s is being deleted even though it was user-edited",
2780 user_edited_overrides_deletion_count++;
2787 else if (
id->override_library->runtime !=
nullptr) {
2797 for (
ID *id_override_old : id_override_old_vector) {
2800 id_override_old_vector.
clear();
2810 if (id_root_reference->
newid !=
nullptr) {
2811 id_root = id_root_reference->
newid;
2814 if (user_edited_overrides_deletion_count > 0) {
2817 "During resync of data-block %s, %d obsolete overrides were deleted, that had "
2818 "local changes defined by user",
2820 user_edited_overrides_deletion_count);
2823 if (do_post_process) {
2835 override_resync_residual_storage,
2880 nullptr,
id,
nullptr,
nullptr);
2903 "Deleting %d unused linked missing IDs and their unused liboverrides (including %d "
2915 Collection *override_resync_residual_storage,
2916 const bool do_hierarchy_enforce,
2919 ListBase no_main_ids_list = {
nullptr};
2921 id_resync_roots.
link = id_root;
2922 id_resync_roots.
next =
nullptr;
2931 override_resync_residual_storage,
2932 do_hierarchy_enforce,
2950 const int library_indirect_level,
2951 const bool do_strict_equal)
2953 const int id_lib_level = (
ID_IS_LINKED(
id) ?
id->lib->runtime->temp_index : 0);
2954 return do_strict_equal ? id_lib_level == library_indirect_level :
2955 id_lib_level <= library_indirect_level;
2972 const int library_indirect_level,
2973 bool is_in_partial_resync_hierarchy)
2981 "While processing indirect level %d, ID %s from lib %s of indirect level %d detected "
2982 "as needing resync, skipping",
2983 library_indirect_level,
2995 bool is_reprocessing_current_entry =
false;
3006 if (!is_in_partial_resync_hierarchy) {
3015 is_reprocessing_current_entry =
true;
3019 "ID %s (%p) is detected as part of a hierarchy dependency loop requiring resync, it "
3020 "is now being re-processed to ensure proper tagging of the whole loop",
3035 "ID %s (%p) was marked as a potential root for partial resync, but it is used by "
3036 "%s (%p), which is also tagged for resync, so it is not a root after all",
3048 if (!is_in_partial_resync_hierarchy) {
3058 if (is_in_partial_resync_hierarchy) {
3063 "ID %s (%p) now tagged as needing resync because they are used by %s (%p) "
3064 "that needs to be resynced",
3075 is_in_partial_resync_hierarchy =
true;
3079 if (!is_reprocessing_current_entry) {
3093 entry_item = entry_item->
next)
3098 ID *id_to = *(entry_item->id_pointer.to);
3107 "Check above ensured `id_to` is a liboverride, so it should be a real one (not "
3108 "an embedded one)");
3116 bmain, id_to, id_root, library_indirect_level, is_in_partial_resync_hierarchy);
3123 if (!is_reprocessing_current_entry) {
3130 if (is_in_partial_resync_hierarchy &&
3137 &
LOG_RESYNC,
"Potential root for partial resync: %s (%p)", id_root->
name, id_root->
lib);
3145 const int library_indirect_level)
3169 if (hierarchy_root ==
nullptr ||
3191 Main *bmain,
ID *
id,
const int library_indirect_level)
3195 if (
id->override_library->hierarchy_root ==
id ||
3199 id->override_library->hierarchy_root !=
id ||
id->override_library->runtime ==
nullptr ||
3218 to_id_entry = to_id_entry->
next)
3223 ID *to_id = *(to_id_entry->id_pointer.to);
3229 bmain, to_id, library_indirect_level))
3243 const int library_indirect_level)
3274 bmain, id_iter,
nullptr, library_indirect_level,
false);
3326 bmain, id_iter, library_indirect_level))
3331 "ID %s (%p) detected as only related to its hierarchy root by 'reversed' "
3332 "relationship(s) (e.g. object parenting), tagging it as needing "
3340 "ID %s (%p) detected as 'isolated' from its hierarchy root, tagging it as needing "
3374 if (id_iter != hierarchy_root) {
3376 "Found root ID '%s' for partial resync root ID '%s'",
3377 hierarchy_root->
name,
3388 id_roots, hierarchy_root,
reinterpret_cast<void ***
>(&id_resync_roots_p)))
3414 Collection *override_resync_residual_storage,
3415 const int library_indirect_level,
3418 const bool do_reports_recursive_resync_timing = (library_indirect_level != 0);
3435 data.is_override =
false;
3436 data.is_resync =
true;
3449 data.root_set(
id->override_library->reference);
3469 &
LOG_RESYNC,
"ID %s (%p) was already tagged as needing resync",
id->name,
id->lib);
3482 entry_item = entry_item->
next)
3487 ID *id_to = *entry_item->id_pointer.to;
3492 "ID %s (%p) now tagged as needing resync because they use linked %s (%p) that "
3493 "now needs to be overridden",
3521 "Checking validity of computed TODO data for root '%s'... \n",
3526 ID *id_resync_root =
static_cast<ID *
>(id_resync_root_iter->
link);
3528 if (id_resync_roots->
list != id_resync_roots->
last_node || id_resync_root != id_root) {
3530 "Hierarchy root ID is tagged for resync, yet it is not the only partial "
3531 "resync roots, this should not happen."
3533 "\n\tFirst Resync root ID: %s"
3534 "\n\tLast Resync root ID: %s",
3540 for (
LinkNode *id_resync_root_iter = id_resync_roots->
list; id_resync_root_iter !=
nullptr;
3541 id_resync_root_iter = id_resync_root_iter->
next)
3543 ID *id_resync_root =
static_cast<ID *
>(id_resync_root_iter->link);
3545 if (id_resync_root == id_root) {
3546 if (id_resync_root_iter != id_resync_roots->
list ||
3547 id_resync_root_iter != id_resync_roots->
last_node)
3550 "Resync root ID is same as root ID of the override hierarchy, yet other "
3551 "resync root IDs are also defined, this should not happen at this point."
3553 "\n\tFirst Resync root ID: %s"
3554 "\n\tLast Resync root ID: %s",
3570 ListBase no_main_ids_list = {
nullptr};
3584 "Resyncing all dependencies under root %s (%p), first one being '%s'...",
3586 reinterpret_cast<void *
>(
library),
3589 new_to_old_libraries_map,
3593 id_resync_roots->
list,
3595 override_resync_residual_storage,
3626 bool process_lib_level_again =
false;
3634 const bool need_reseync_original = (
id->override_library->runtime !=
nullptr &&
3635 (
id->override_library->runtime->tag &
3637 const bool is_isolated_from_root = (
id->override_library->runtime !=
nullptr &&
3638 (
id->override_library->runtime->tag &
3641 if (need_resync && is_isolated_from_root) {
3645 "Deleting unused ID override %s from library level %d, still found as needing "
3646 "resync, and being isolated from its hierarchy root. This can happen when its "
3647 "otherwise unchanged linked reference was moved around in the library file (e.g. if "
3648 "an object was moved into another sub-collection of the same hierarchy).",
3656 "Keeping user-edited ID override %s from library level %d still found as "
3657 "needing resync, and being isolated from its hierarchy root. This can happen when its "
3658 "otherwise unchanged linked reference was moved around in the library file (e.g. if "
3659 "an object was moved into another sub-collection of the same hierarchy).",
3666 else if (need_resync) {
3667 if (need_reseync_original) {
3669 "ID override %s from library level %d still found as needing resync after "
3670 "tackling library level %d. Since it was originally tagged as such by "
3671 "RNA/liboverride apply code, this whole level of library needs to be processed "
3675 library_indirect_level);
3676 process_lib_level_again =
true;
3685 "ID override %s from library level %d still found as needing resync after "
3686 "tackling library level %d. However, it was not tagged as such by "
3687 "RNA/liboverride apply code, so ignoring it",
3690 library_indirect_level);
3694 else if (need_reseync_original) {
3698 else if (is_isolated_from_root) {
3701 "ID override %s from library level %d still tagged as isolated from its hierarchy root, "
3702 "it should have been either properly resynced or removed at that point.",
3727 processed_ids.
add(
id);
3738 if (do_reports_recursive_resync_timing) {
3742 return process_lib_level_again;
3753 const int owner_library_indirect_level =
ID_IS_LINKED(id_owner) ?
3756 if (owner_library_indirect_level > 100) {
3758 "Levels of indirect usages of libraries is way too high, there are most likely "
3759 "dependency loops, skipping further building loops (involves at least '%s' from "
3760 "'%s' and '%s' from '%s')",
3767 if (owner_library_indirect_level > 90) {
3770 "Levels of indirect usages of libraries is suspiciously too high, there are most likely "
3771 "dependency loops (involves at least '%s' from '%s' and '%s' from '%s')",
3778 if (owner_library_indirect_level >=
id->lib->runtime->temp_index) {
3779 id->lib->runtime->temp_index = owner_library_indirect_level + 1;
3780 *
reinterpret_cast<bool *
>(cb_data->
user_data) =
true;
3796 library->runtime->temp_index = 1;
3798 bool do_continue =
true;
3799 while (do_continue) {
3800 do_continue =
false;
3812 int library_indirect_level_max = 0;
3814 library_indirect_level_max = std::max(
library->runtime->temp_index,
3815 library_indirect_level_max);
3817 return library_indirect_level_max;
3829#define OVERRIDE_RESYNC_RESIDUAL_STORAGE_NAME "OVERRIDE_RESYNC_LEFTOVERS"
3832 if (override_resync_residual_storage !=
nullptr &&
3835 override_resync_residual_storage =
nullptr;
3837 if (override_resync_residual_storage ==
nullptr) {
3853 while (library_indirect_level >= 0) {
3854 int level_reprocess_count = 0;
3868 new_to_old_libraries_map,
3871 override_resync_residual_storage,
3872 library_indirect_level,
3875 level_reprocess_count++;
3876 if (level_reprocess_count > 100) {
3879 "Need to reprocess resync for library level %d more than %d times, aborting. This is "
3880 "either caused by extremely complex liboverride hierarchies, or a bug",
3881 library_indirect_level,
3882 level_reprocess_count);
3886 "Applying reprocess %d for resyncing at library level %d",
3887 level_reprocess_count,
3888 library_indirect_level);
3890 library_indirect_level--;
3902 override_resync_residual_storage,
3913 "library '%s' contains some linked overrides that required recursive resync, "
3914 "consider updating it",
3936 data.scene =
nullptr;
3939 data.is_override =
true;
3940 data.is_resync =
false;
3942 data.root_set(id_root);
3982 if (!
id->override_library) {
3989 if (shape_key !=
nullptr) {
3994 Collection *master_collection =
reinterpret_cast<Scene *
>(
id)->master_collection;
3995 if (master_collection !=
nullptr) {
4001 if (node_tree !=
nullptr) {
4033 const char *rna_path)
4040 const char *rna_path,
4045 if (op ==
nullptr) {
4057 else if (r_created) {
4072 idpoin, library_prop->
rna_path, r_override_poin, r_override_prop, r_index);
4085 opop_dst = opop_dst->
next, opop_src = opop_src->
next)
4104 const char *old_rna_path,
4105 const char *new_rna_path)
4112 if (liboverride_property ==
nullptr) {
4128 const bool do_runtime_updates)
4130 if (do_runtime_updates &&
4143 const char *rna_path)
4150 if (liboverride_property ==
nullptr) {
4167 const char *subitem_main_name,
4168 const char *subitem_other_name,
4169 const std::optional<const ID *> &subitem_main_id,
4170 const std::optional<const ID *> &subitem_other_id,
4171 const size_t offesetof_opop_main_name,
4172 const size_t offesetof_opop_other_name,
4173 const size_t offesetof_opop_main_id,
4174 const size_t offesetof_opop_other_id)
4176 const bool do_ids(subitem_main_id);
4179 liboverride_operations, subitem_main_name,
int(offesetof_opop_main_name)));
4182 reinterpret_cast<Link *
>(opop), subitem_main_name,
int(offesetof_opop_main_name))))
4184 const char *opop_other_name = *
reinterpret_cast<const char **
>(
reinterpret_cast<char *
>(opop) +
4185 offesetof_opop_other_name);
4188 if (do_ids && opop_use_id) {
4190 const ID *opop_main_id = *
reinterpret_cast<const ID **
>(
reinterpret_cast<char *
>(opop) +
4191 offesetof_opop_main_id);
4192 if (*subitem_main_id != opop_main_id) {
4195 const ID *opop_other_id = *
reinterpret_cast<const ID **
>(
reinterpret_cast<char *
>(opop) +
4196 offesetof_opop_other_id);
4197 if (*subitem_other_id != opop_other_id) {
4204 if ((do_ids && opop_use_id) || (!do_ids && !opop_use_id)) {
4205 if (!subitem_other_name && !opop_other_name) {
4208 if (subitem_other_name && opop_other_name &&
STREQ(subitem_other_name, opop_other_name)) {
4221 const char *subitem_refname,
4222 const char *subitem_locname,
4223 const std::optional<const ID *> &subitem_refid,
4224 const std::optional<const ID *> &subitem_locid,
4225 const int subitem_refindex,
4226 const int subitem_locindex,
4230 BLI_assert(!subitem_refid == !subitem_locid);
4233 const int subitem_defindex = -1;
4239 if (subitem_locname !=
nullptr) {
4251 if (opop !=
nullptr) {
4256 if (subitem_refname !=
nullptr) {
4268 if (opop !=
nullptr) {
4276 sizeof(subitem_locindex),
4285 sizeof(subitem_refindex),
4293 if (!strict && (subitem_locindex != subitem_defindex)) {
4297 sizeof(subitem_defindex),
4312 const short operation,
4313 const char *subitem_refname,
4314 const char *subitem_locname,
4315 const std::optional<ID *> &subitem_refid,
4316 const std::optional<ID *> &subitem_locid,
4317 const int subitem_refindex,
4318 const int subitem_locindex,
4323 BLI_assert(!subitem_refid == !subitem_locid);
4326 liboverride_property,
4336 if (opop ==
nullptr) {
4339 if (subitem_locname) {
4342 if (subitem_refname) {
4348 if (subitem_refid) {
4360 else if (r_created) {
4405 switch (liboverride_property_operation->
operation) {
4413 if (ptr_storage ==
nullptr || ptr_storage->
data ==
nullptr || prop_storage ==
nullptr) {
4414 BLI_assert_msg(0,
"Missing data to apply differential override operation.");
4423 if ((ptr_dst ==
nullptr || ptr_dst->
data ==
nullptr || prop_dst ==
nullptr) ||
4424 (ptr_src ==
nullptr || ptr_src->
data ==
nullptr || prop_src ==
nullptr))
4442 "Library override templates have been removed: removing all override data from "
4443 "the data-block '%s'",
4452 "Data corruption: data-block '%s' is using itself as library override reference, "
4453 "removing all override data",
4462 "Data corruption: data-block '%s' is using another local data-block ('%s') as "
4463 "library override reference, removing all override data",
4477 if (!op->rna_path) {
4481 "Data corruption: data-block `%s` has a Library Override property with no RNA path",
4499 ID *liboverride_id =
id;
4671 liboverride_match_flags,
4672 &local_report_flags);
4675 CLOG_DEBUG(&
LOG,
"We did restore some properties of %s from its reference", local->
name);
4679 &
LOG,
"We did tag some properties of %s for restoration from its reference", local->
name);
4688 if (r_report_flags !=
nullptr) {
4689 *r_report_flags = (*r_report_flags | local_report_flags);
4738 if (r_report_flags !=
nullptr) {
4752 ID *
id =
static_cast<ID *
>(taskdata);
4765 const bool force_auto,
4766 int *r_report_flags)
4770#ifdef DEBUG_OVERRIDE_TIMEIT
4792 create_pool_data.
bmain = bmain;
4815 if (
Collection *scene_collection =
reinterpret_cast<Scene *
>(
id)->master_collection) {
4860 bmain,
reinterpret_cast<int *
>(&create_pool_data.
report_flags));
4865 if (r_report_flags !=
nullptr) {
4873#ifdef DEBUG_OVERRIDE_TIMEIT
4902 const bool do_reset_system_override)
4904 bool was_op_deleted =
false;
4906 if (do_reset_system_override) {
4913 bool do_op_delete =
true;
4915 if (is_collection || op->rna_prop_type ==
PROP_POINTER) {
4930 if (is_collection) {
4938 if (
ptr.owner_id !=
nullptr && ptr_lib.
owner_id !=
nullptr) {
4941 ptr.owner_id->override_library !=
nullptr &&
4942 ptr.owner_id->override_library->reference == ptr_lib.
owner_id);
4950 was_op_deleted =
true;
4954 if (was_op_deleted) {
4961 return was_op_deleted;
4966 const bool do_reset_system_override)
4984 const bool do_reset_system_override)
4991 if (entry_vp ==
nullptr) {
5010 to_id_entry = to_id_entry->
next)
5016 if (*to_id_entry->id_pointer.to !=
nullptr) {
5017 ID *to_id = *to_id_entry->id_pointer.to;
5027 const bool do_reset_system_override)
5052 if (liboverride_property !=
nullptr) {
5054 liboverride_property->
tag |= tag;
5057 liboverride_property->
tag &= ~tag;
5189 if (tmp_id ==
nullptr) {
5196 tmp_id->
lib = local->
lib;
5208 if (local_key !=
nullptr && tmp_key !=
nullptr) {
5231 if (local_key !=
nullptr && tmp_key !=
nullptr) {
5239 local_key->
from = local;
5240 tmp_key->
from = tmp_id;
5253 if (ob->pose !=
nullptr && ob->data == local) {
5293 if (
id->override_library !=
nullptr) {
5328 const char *line_prefix =
"";
5329 if (intro_txt !=
nullptr) {
5330 std::cout << intro_txt <<
"\n";
5335 std::cout << line_prefix << op->rna_path <<
" [";
5337 std::cout <<
" UNUSED ";
5342 std::cout << line_prefix << line_prefix << opop->operation <<
" [";
5344 std::cout <<
" UNUSED ";
5347 std::cout <<
" MATCH_REF ";
5350 if (opop->subitem_reference_name || opop->subitem_local_name) {
5351 std::cout <<
"(" << opop->subitem_reference_name <<
" <" << opop->subitem_reference_id
5352 <<
"> -> " << opop->subitem_local_name <<
" <" << opop->subitem_local_id <<
">)";
5354 else if (opop->subitem_reference_index >= 0 || opop->subitem_local_index >= 0) {
5355 std::cout <<
"(" << opop->subitem_reference_index <<
" -> " << opop->subitem_local_index
AnimData * BKE_animdata_from_id(const ID *id)
void BKE_animdata_liboverride_post_process(ID *id)
void BKE_pose_clear_pointers(bPose *pose)
void BKE_pose_ensure(Main *bmain, Object *ob, bArmature *arm, bool do_id_user)
Main * BKE_blender_globals_main_swap(Main *new_gmain)
void BKE_collection_add_from_collection(Main *bmain, Scene *scene, Collection *collection_src, Collection *collection_dst)
Collection * BKE_collection_add(Main *bmain, Collection *collection_parent, const char *name_custom)
bool BKE_collection_has_object(Collection *collection, const Object *ob)
bool BKE_collection_is_empty(const Collection *collection)
bool BKE_collection_is_in_scene(Collection *collection)
void BKE_collection_add_from_object(Main *bmain, Scene *scene, const Object *ob_src, Collection *collection_dst)
GSet * BKE_scene_objects_as_gset(Scene *scene, GSet *objects_gset)
void BKE_collection_object_add_from(Main *bmain, Scene *scene, Object *ob_src, Object *ob_dst)
bool BKE_collection_delete(Main *bmain, Collection *collection, bool hierarchy)
bool BKE_collection_has_collection(const Collection *parent, const Collection *collection)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
FCurve * BKE_animadata_fcurve_find_by_rna_path(AnimData *animdata, const char *rna_path, const int rna_index, bAction **r_action, bool *r_driven)
@ G_LIBOVERRIDE_NO_AUTO_RESYNC
bool BKE_idtype_idcode_is_linkable(short idcode)
Key ** BKE_key_from_id_p(ID *id)
Key * BKE_key_from_id(ID *id)
bool BKE_view_layer_has_collection(const ViewLayer *view_layer, const Collection *collection)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
void BKE_layer_collection_resync_forbid()
void BKE_scene_view_layers_synced_ensure(const Scene *scene)
void BKE_main_collection_sync_remap(const Main *bmain)
void BKE_layer_collection_resync_allow()
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
void BKE_main_collection_sync(const Main *bmain)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
void BKE_main_view_layers_synced_ensure(const Main *bmain)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
struct ID * BKE_id_copy_in_lib(Main *bmain, std::optional< Library * > owner_library, const ID *id, std::optional< const ID * > new_owner_id, ID **new_id_p, int flag)
void size_t BKE_id_multi_tagged_delete(Main *bmain) ATTR_NONNULL()
void BKE_id_free(Main *bmain, void *idv)
void id_sort_by_name(ListBase *lb, ID *id, ID *id_sorting_hint)
void id_fake_user_set(ID *id)
void BKE_lib_id_swap(Main *bmain, ID *id_a, ID *id_b, const bool do_self_remap, const int self_remap_flags)
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
ID * BKE_id_owner_get(ID *id, const bool debug_relationship_assert=true)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
void * BKE_id_new(Main *bmain, short type, const char *name)
@ LIB_ID_COPY_NO_LIB_OVERRIDE
@ LIB_ID_COPY_NO_LIB_OVERRIDE_LOCAL_DATA_FLAG
@ LIB_ID_FREE_NO_NAMEMAP_REMOVE
void BKE_id_free_ex(Main *bmain, void *idv, int flag_orig, bool use_flag_from_idtag)
void BKE_libblock_management_main_add(Main *bmain, void *idv)
void BKE_main_id_tag_all(Main *mainvar, int tag, bool value)
void BKE_lib_override_library_main_operations_create(Main *bmain, bool force_auto, int *r_report_flags)
void BKE_lib_query_unused_ids_tag(Main *bmain, int tag, LibQueryUnusedIDsData ¶meters)
@ IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE
@ IDWALK_CB_OVERRIDE_LIBRARY_HIERARCHY_DEFAULT
void BKE_library_foreach_ID_link(Main *bmain, ID *id, blender::FunctionRef< LibraryIDLinkCallback > callback, void *user_data, LibraryForeachIDFlag flag)
void BKE_libblock_relink_multiple(Main *bmain, const blender::Span< ID * > ids, eIDRemapType remap_type, blender::bke::id::IDRemapper &id_remapper, int remap_flags)
void BKE_libblock_remap_multiple(Main *bmain, blender::bke::id::IDRemapper &mappings, const int remap_flags)
void BKE_libblock_relink_ex(Main *bmain, void *idv, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(2)
void void BKE_libblock_remap(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
@ ID_REMAP_SKIP_OVERRIDE_LIBRARY
@ ID_REMAP_FORCE_USER_REFCOUNT
@ ID_REMAP_SKIP_INDIRECT_USAGE
@ ID_REMAP_FORCE_NEVER_NULL_USAGE
@ LIBRARY_TAG_RESYNC_REQUIRED
#define FOREACH_MAIN_ID_END
ListBase * which_libbase(Main *bmain, short type)
#define FOREACH_MAIN_LISTBASE_ID_END
#define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id)
#define FOREACH_MAIN_LISTBASE_END
eMainIDRelationsEntryTags
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_TO
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED
@ MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS
@ MAINIDRELATIONS_ENTRY_TAGS_DOIT
@ MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_FROM
void BKE_main_relations_tag_set(Main *bmain, eMainIDRelationsEntryTags tag, bool value)
#define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb)
void BKE_main_relations_create(Main *bmain, short flag)
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
void BKE_main_relations_free(Main *bmain)
void BKE_main_namemap_remove_id(Main &bmain, ID &id)
void BKE_main_namemap_destroy(UniqueName_Map **r_name_map) ATTR_NONNULL()
bool BKE_main_global_namemap_get_unique_name(Main &bmain, ID &id, char *r_name)
bool BKE_main_namemap_validate(Main &bmain)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
bool BLI_ghashutil_strcmp(const void *a, const void *b)
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_haskey(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghashIterator_step(GHashIterator *ghi)
void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
unsigned int BLI_ghashutil_ptrhash(const void *key)
void BLI_ghashIterator_free(GHashIterator *ghi)
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
void * BLI_gset_lookup(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
GHashIterator * BLI_ghashIterator_new(GHash *gh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void ** BLI_ghash_lookup_p(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_popkey(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp) ATTR_WARN_UNUSED_RESULT
bool BLI_ghashutil_ptrcmp(const void *a, const void *b)
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void * BLI_ghash_lookup(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
BLI_INLINE bool BLI_ghashIterator_done(const GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
void BLI_linklist_append_arena(LinkNodePair *list_pair, void *ptr, struct MemArena *ma) ATTR_NONNULL(1
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
void void void void BLI_linklist_append(LinkNodePair *list_pair, void *ptr) ATTR_NONNULL(1)
int BLI_linklist_index(const LinkNode *list, const void *ptr) ATTR_WARN_UNUSED_RESULT
void void BLI_linklist_prepend(LinkNode **listp, void *ptr) ATTR_NONNULL(1)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
void BLI_insertlinkreplace(ListBase *listbase, void *vreplacelink, void *vnewlink) ATTR_NONNULL(1
void BLI_freelinkN(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void * BLI_listbase_findafter_string_ptr(Link *link, const char *id, int offset)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_listbase_bytes_find(const ListBase *listbase, const void *bytes, size_t bytes_size, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void * BLI_findstring_ptr(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void void void void void BLI_duplicatelist(ListBase *dst, const ListBase *src) ATTR_NONNULL(1
#define BLI_MEMARENA_STD_BUFSIZE
MemArena * BLI_memarena_new(size_t bufsize, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL ATTR_NONNULL(2) ATTR_MALLOC
void * BLI_memarena_calloc(MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2)
void BLI_memarena_free(MemArena *ma) ATTR_NONNULL(1)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
char * STRNCPY(char(&dst)[N], const char *src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void * BLI_task_pool_user_data(TaskPool *pool)
void BLI_task_pool_work_and_wait(TaskPool *pool)
TaskPool * BLI_task_pool_create(void *userdata, eTaskPriority priority)
void BLI_task_pool_free(TaskPool *pool)
void BLI_task_pool_push(TaskPool *pool, TaskRunFunction run, void *taskdata, bool free_taskdata, TaskFreeFunction freedata)
Platform independent time functions.
double BLI_time_now_seconds(void)
Utility defines for timing/benchmarks.
#define TIMEIT_START_AVERAGED(var)
#define TIMEIT_END_AVERAGED(var)
#define UNUSED_VARS_NDEBUG(...)
external readfile function prototypes.
#define CLOG_ERROR(clg_ref,...)
#define CLOG_DEBUG(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_OVERRIDE_LIBRARY_VIRTUAL(_id)
@ ID_TAG_NO_USER_REFCOUNT
@ ID_TAG_LIBOVERRIDE_AUTOREFRESH
@ ID_TAG_LIBOVERRIDE_NEED_RESYNC
@ ID_TAG_LIBOVERRIDE_REFOK
@ LIBOVERRIDE_TAG_NEEDS_RESTORE
@ LIBOVERRIDE_TAG_RESYNC_ISOLATED_FROM_ROOT
@ LIBOVERRIDE_TAG_NEEDS_RELOAD
@ LIBOVERRIDE_TAG_NEED_RESYNC_ORIGINAL
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_ITEM_USE_ID
@ LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE
#define ID_IS_LINKED(_id)
@ LIBOVERRIDE_PROP_TAG_NEEDS_RETORE
@ LIBOVERRIDE_PROP_OP_TAG_UNUSED
#define ID_REAL_USERS(id)
@ LIBOVERRIDE_OP_SUBTRACT
@ LIBOVERRIDE_OP_MULTIPLY
@ LIBOVERRIDE_OP_INSERT_BEFORE
@ LIBOVERRIDE_OP_INSERT_AFTER
#define ID_IS_OVERRIDE_LIBRARY(_id)
@ LIBOVERRIDE_FLAG_NO_HIERARCHY
@ LIBOVERRIDE_FLAG_SYSTEM_DEFINED
@ ID_FLAG_EMBEDDED_DATA_LIB_OVERRIDE
@ ID_FLAG_LIB_OVERRIDE_RESYNC_LEFTOVER
Object groups, one object can be in many groups at once.
@ COLLECTION_HIDE_VIEWPORT
Object is a sort of wrapper for general info.
#define OB_DATA_SUPPORT_ID(_id_type)
#define USER_DEVELOPER_TOOL_TEST(userdef, member)
Read Guarded memory(de)allocation.
@ RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS
@ RNA_OVERRIDE_APPLY_FLAG_SKIP_RESYNC_CHECK
@ RNA_OVERRIDE_APPLY_FLAG_NOP
@ RNA_OVERRIDE_APPLY_FLAG_RESTORE_ONLY
@ RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN
@ RNA_OVERRIDE_COMPARE_CREATE
@ RNA_OVERRIDE_COMPARE_IGNORE_NON_OVERRIDABLE
@ RNA_OVERRIDE_COMPARE_RESTORE
@ RNA_OVERRIDE_COMPARE_TAG_FOR_RESTORE
@ RNA_OVERRIDE_MATCH_RESULT_RESTORED
@ RNA_OVERRIDE_MATCH_RESULT_RESTORE_TAGGED
@ RNA_OVERRIDE_MATCH_RESULT_CREATED
@ RNA_OVERRIDE_MATCH_RESULT_INIT
Provides wrapper around system-specific atomic primitives, and some extensions (faked-atomic operatio...
ATOMIC_INLINE uint32_t atomic_fetch_and_or_uint32(uint32_t *p, uint32_t x)
BMesh const char void * data
Value lookup_default(const Key &key, const Value &default_value) const
bool contains(const Key &key) const
void append(const T &value)
void add(ID *old_id, ID *new_id)
DEG_id_tag_update_ex(cb_data->bmain, cb_data->owner_id, ID_RECALC_TAG_FOR_UNDO|ID_RECALC_SYNC_TO_EVAL)
void lib_id_copy_ensure_local(Main *bmain, const ID *old_id, ID *new_id, const int flags)
static void lib_override_library_main_hierarchy_id_root_ensure(Main *bmain, ID *id, blender::Set< ID * > &processed_ids)
void BKE_lib_override_library_main_hierarchy_root_ensure(Main *bmain)
void BKE_lib_override_library_main_tag(Main *bmain, const short tag, const bool do_set)
static bool lib_override_hierarchy_dependencies_recursive_tag(LibOverrideGroupTagData *data)
static void lib_override_library_create_post_process(Main *bmain, Scene *scene, ViewLayer *view_layer, const Library *owner_library, ID *id_root, ID *id_instance_hint, Collection *residual_storage, const Object *old_active_object, const bool is_resync)
static LibOverrideMissingIDsData_Key lib_override_library_resync_missing_id_key(ID *id)
static LibOverrideMissingIDsData lib_override_library_resync_build_missing_ids_data(Main *bmain, const bool is_relocate)
static bool lib_override_resync_id_lib_level_is_valid(ID *id, const int library_indirect_level, const bool do_strict_equal)
static void lib_override_library_property_clear(IDOverrideLibraryProperty *op)
static void lib_override_resync_tagging_finalize(Main *bmain, GHash *id_roots, const int library_indirect_level)
static bool lib_override_library_resync(Main *bmain, const blender::Map< Library *, Library * > *new_to_old_libraries_map, Scene *scene, ViewLayer *view_layer, ID *id_root, LinkNode *id_resync_roots, ListBase *no_main_ids_list, Collection *override_resync_residual_storage, const bool do_hierarchy_enforce, const bool do_post_process, BlendFileReadReport *reports)
static bool override_library_is_valid(const ID &id, const IDOverrideLibrary &liboverride, ReportList *reports)
BLI_INLINE GHash * override_library_rna_path_mapping_ensure(IDOverrideLibrary *liboverride)
std::map< LibOverrideMissingIDsData_Key, LibOverrideMissingIDsData_Value > LibOverrideMissingIDsData
static void lib_override_group_tag_data_object_to_collection_init_collection_process(LibOverrideGroupTagData *data, Collection *collection)
static void lib_override_group_tag_data_object_to_collection_init(LibOverrideGroupTagData *data)
static void lib_override_hierarchy_dependencies_recursive_tag_from(LibOverrideGroupTagData *data)
static IDOverrideLibraryPropertyOperation * liboverride_opop_find_name_lib_iterative(ListBase *liboverride_operations, const char *subitem_main_name, const char *subitem_other_name, const std::optional< const ID * > &subitem_main_id, const std::optional< const ID * > &subitem_other_id, const size_t offesetof_opop_main_name, const size_t offesetof_opop_other_name, const size_t offesetof_opop_main_id, const size_t offesetof_opop_other_id)
bool BKE_lib_override_library_property_rna_path_change(IDOverrideLibrary *liboverride, const char *old_rna_path, const char *new_rna_path)
void BKE_lib_override_library_property_operation_delete(IDOverrideLibraryProperty *liboverride_property, IDOverrideLibraryPropertyOperation *liboverride_property_operation)
void BKE_lib_override_library_main_validate(Main *bmain, ReportList *reports)
IDOverrideLibraryProperty * BKE_lib_override_library_property_find(IDOverrideLibrary *liboverride, const char *rna_path)
static void lib_override_overrides_group_tag_recursive(LibOverrideGroupTagData *data)
static ID * lib_override_root_find(Main *bmain, ID *id, const int curr_level, int *r_best_level)
IDOverrideLibraryPropertyOperation * BKE_lib_override_library_property_operation_get(IDOverrideLibraryProperty *liboverride_property, const short operation, const char *subitem_refname, const char *subitem_locname, const std::optional< ID * > &subitem_refid, const std::optional< ID * > &subitem_locid, const int subitem_refindex, const int subitem_locindex, const bool strict, bool *r_strict, bool *r_created)
void BKE_lib_override_library_main_operations_create(Main *bmain, const bool force_auto, int *r_report_flags)
void BKE_lib_override_library_main_operations_restore(Main *bmain, int *r_report_flags)
void BKE_lib_override_library_properties_tag(IDOverrideLibrary *liboverride, const short tag, const bool do_set)
void BKE_lib_override_debug_print(IDOverrideLibrary *liboverride, const char *intro_txt)
bool BKE_lib_override_library_id_is_user_deletable(Main *bmain, ID *id)
IDOverrideLibraryProperty * BKE_lib_override_library_property_get(IDOverrideLibrary *liboverride, const char *rna_path, bool *r_created)
static void lib_override_linked_group_tag(LibOverrideGroupTagData *data)
bool BKE_lib_override_library_is_system_defined(const Main *bmain, const ID *id)
bool BKE_lib_override_library_property_is_animated(const ID *id, const IDOverrideLibraryProperty *liboverride_prop, const PropertyRNA *override_rna_prop, const int rnaprop_index)
#define OVERRIDE_RESYNC_RESIDUAL_STORAGE_NAME
void BKE_lib_override_id_tag_on_deg_tag_from_user(ID *id)
static bool lib_override_root_is_valid(Main *bmain, ID *id)
bool BKE_lib_override_library_property_search_and_delete(IDOverrideLibrary *liboverride, const char *rna_path)
static void lib_override_root_hierarchy_set(Main *bmain, ID *id_root, ID *id, ID *id_from, blender::Set< ID * > &processed_ids)
static void lib_override_library_operations_create(Main *bmain, ID *local, const eRNAOverrideMatch liboverride_match_flags, eRNAOverrideMatchResult *r_report_flags)
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)
static void lib_override_library_property_operation_copy(IDOverrideLibraryPropertyOperation *opop_dst, IDOverrideLibraryPropertyOperation *opop_src)
bool BKE_lib_override_library_status_check_reference(Main *bmain, ID *local)
void BKE_lib_override_library_update(Main *bmain, ID *local)
void BKE_lib_override_library_operations_restore(Main *bmain, ID *local, int *r_report_flags)
std::deque< ID * > LibOverrideMissingIDsData_Value
static void lib_override_id_swap(Main *bmain, ID *id_local, ID *id_temp)
static void lib_override_cleanup_after_resync(Main *bmain)
BLI_INLINE IDOverrideLibraryRuntime * override_library_runtime_ensure(IDOverrideLibrary *liboverride)
void BKE_lib_override_library_clear(IDOverrideLibrary *liboverride, const bool do_id_user)
void BKE_lib_override_library_id_unused_cleanup(ID *local)
static void lib_override_library_operations_create_cb(TaskPool *__restrict pool, void *taskdata)
static bool lib_override_library_create_do(Main *bmain, Scene *scene, Library *owner_library, ID *id_root_reference, ID *id_hierarchy_root_reference, const bool do_fully_editable)
static void override_library_properties_validate(const ID &id, IDOverrideLibrary &liboverride, ReportList *reports)
static void lib_override_resync_tagging_finalize_recurse(Main *bmain, ID *id_root, ID *id_from, const int library_indirect_level, bool is_in_partial_resync_hierarchy)
bool BKE_lib_override_library_create(Main *bmain, Scene *scene, ViewLayer *view_layer, Library *owner_library, ID *id_root_reference, ID *id_hierarchy_root_reference, ID *id_instance_hint, ID **r_id_root_override, const bool do_fully_editable)
static bool lib_override_library_id_reset_do(Main *bmain, ID *id_root, const bool do_reset_system_override)
bool BKE_lib_override_library_is_user_edited(const ID *id)
static CLG_LogRef LOG_RESYNC
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, const int subitem_refindex, const int subitem_locindex, const bool strict, bool *r_strict)
static void lib_override_remapper_overrides_add(id::IDRemapper &id_remapper, ID *reference_id, ID *local_id)
static bool lib_override_library_main_resync_on_library_indirect_level(Main *bmain, const blender::Map< Library *, Library * > *new_to_old_libraries_map, Scene *scene, ViewLayer *view_layer, Collection *override_resync_residual_storage, const int library_indirect_level, BlendFileReadReport *reports)
bool BKE_lib_override_library_create_from_tag(Main *bmain, Library *owner_library, const ID *id_root_reference, ID *id_hierarchy_root, const ID *id_hierarchy_root_reference, const bool do_no_main, const bool do_fully_editable)
void BKE_lib_override_library_id_reset(Main *bmain, ID *id_root, const bool do_reset_system_override)
bool BKE_lib_override_rna_property_find(PointerRNA *idpoin, const IDOverrideLibraryProperty *library_prop, PointerRNA *r_override_poin, PropertyRNA **r_override_prop, int *r_index)
bool BKE_lib_override_library_status_check_local(Main *bmain, ID *local)
static void lib_override_linked_group_tag_clear_boneshapes_objects(LibOverrideGroupTagData *data)
void BKE_lib_override_library_operations_create(Main *bmain, ID *local, int *r_report_flags)
static void lib_override_library_id_hierarchy_recursive_reset(Main *bmain, ID *id_root, const bool do_reset_system_override)
bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_layer, ID *id_root, Collection *override_resync_residual_storage, const bool do_hierarchy_enforce, BlendFileReadReport *reports)
static void lib_override_library_property_delete(IDOverrideLibrary *liboverride, IDOverrideLibraryProperty *liboverride_property, const bool do_runtime_updates)
void BKE_lib_override_library_main_resync(Main *bmain, const blender::Map< Library *, Library * > *new_to_old_libraries_map, Scene *scene, ViewLayer *view_layer, BlendFileReadReport *reports)
static int lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
static bool lib_override_hierarchy_dependencies_skip_check(ID *owner_id, ID *other_id, const bool check_override)
void BKE_lib_override_library_make_local(Main *bmain, ID *id)
static bool lib_override_linked_group_tag_collections_keep_tagged_check_recursive(LibOverrideGroupTagData *data, Collection *collection)
IDOverrideLibrary * BKE_lib_override_library_init(ID *local_id, ID *reference_id)
void BKE_lib_override_library_validate(Main *bmain, ID *id, ReportList *reports)
BLI_INLINE void lib_override_object_posemode_transfer(ID *id_dst, ID *id_src)
const std::pair< std::string, Library * > LibOverrideMissingIDsData_Key
static bool lib_override_hierarchy_dependencies_relationship_skip_check(MainIDRelationsEntryItem *relation_id_entry)
static void lib_override_library_remap(Main *bmain, const ID *id_root_reference, blender::Vector< std::pair< ID *, ID * > > &references_and_new_overrides, GHash *linkedref_to_old_override)
void BKE_lib_override_library_delete(Main *bmain, ID *id_root)
static bool lib_override_library_main_resync_id_skip_check(ID *id, const int library_indirect_level)
bool BKE_lib_override_library_is_hierarchy_leaf(Main *bmain, ID *id)
static void lib_override_linked_group_tag_recursive(LibOverrideGroupTagData *data)
static int foreachid_is_hierarchy_leaf_fn(LibraryIDLinkCallbackData *cb_data)
static ID * lib_override_library_resync_search_missing_ids_data(LibOverrideMissingIDsData &missing_ids, ID *id_override)
void BKE_lib_override_library_id_hierarchy_reset(Main *bmain, ID *id_root, const bool do_reset_system_override)
void BKE_lib_override_library_property_delete(IDOverrideLibrary *liboverride, IDOverrideLibraryProperty *liboverride_property)
static void lib_override_library_property_operation_clear(IDOverrideLibraryPropertyOperation *opop)
void BKE_lib_override_library_main_update(Main *bmain)
void BKE_lib_override_library_main_unused_cleanup(Main *bmain)
static void lib_override_overrides_group_tag(LibOverrideGroupTagData *data)
ID * BKE_lib_override_library_create_from_id(Main *bmain, ID *reference_id, const bool do_tagged_remap)
#define HIERARCHY_BREAKING_ID_TYPES
static ID * lib_override_library_create_from(Main *bmain, Library *owner_library, ID *reference_id, const int lib_id_copy_flags)
void BKE_lib_override_library_operations_tag(IDOverrideLibraryProperty *liboverride_property, const short tag, const bool do_set)
void BKE_lib_override_library_free(IDOverrideLibrary **liboverride, const bool do_id_user)
BLI_INLINE const IDOverrideLibrary * BKE_lib_override_library_get(const Main *, const ID *id, const ID *, const ID **r_owner_id)
static void lib_override_prefill_newid_from_existing_overrides(Main *bmain, ID *id_hierarchy_root)
void BKE_lib_override_library_copy(ID *dst_id, const ID *src_id, const bool do_full_copy)
static int lib_override_libraries_index_define(Main *bmain)
static bool lib_override_resync_tagging_finalize_recursive_check_from(Main *bmain, ID *id, const int library_indirect_level)
static void lib_override_library_property_copy(IDOverrideLibraryProperty *op_dst, IDOverrideLibraryProperty *op_src)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
bool is_auto_resync_enabled()
bNodeTree * node_tree_from_id(ID *id)
bool RNA_struct_is_ID(const StructRNA *type)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
PropertyType RNA_property_type(PropertyRNA *prop)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
void RNA_struct_override_apply(Main *bmain, PointerRNA *id_ptr_dst, PointerRNA *id_ptr_src, PointerRNA *id_ptr_storage, IDOverrideLibrary *liboverride, const eRNAOverrideApplyFlag flag)
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)
const char * RNA_path_array_index_token_find(const char *rna_path, const PropertyRNA *array_prop)
bool RNA_path_resolve_property(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop)
bool RNA_path_resolve_property_full(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
LinkNode * resynced_lib_overrides_libraries
double lib_overrides_recursive_resync
struct BlendFileReadReport::@077003321007012203371307366200326111253233132273 duration
bool do_resynced_lib_overrides_libraries_list
int resynced_lib_overrides
int resynced_lib_overrides_libraries_count
struct BlendFileReadReport::@124362246150331065306145367225174223236260272332 count
struct CollectionChild * next
struct CollectionObject * next
struct IDOverrideLibraryPropertyOperation * next
int subitem_reference_index
char * subitem_local_name
struct ID * subitem_reference_id
struct ID * subitem_local_id
char * subitem_reference_name
struct IDOverrideLibraryProperty * next
struct GHash * rna_path_to_override_properties
struct ID * hierarchy_root
IDOverrideLibraryRuntime * runtime
IDOverrideLibrary * override_library
bool id_tag_clear(ID *id, const bool is_missing)
blender::Set< ID * > linked_ids_hierarchy_default_override
ID * hierarchy_root_id_override
void root_set(ID *id_root)
void hierarchy_root_set(ID *hierarchy_root_id)
bool do_create_linked_overrides_set
GHash * linked_object_to_instantiating_collections
ID * hierarchy_root_id_reference
ID * hierarchy_root_get()
bool id_tag_set(ID *id, const bool is_missing)
eRNAOverrideMatchResult report_flags
std::array< int, INDEX_ID_MAX > num_total
std::array< int, INDEX_ID_MAX > num_local
blender::FunctionRef< bool(ID *id)> filter_fn
LibraryForeachIDCallbackFlag cb_flag
LibraryRuntimeHandle * runtime
MainIDRelationsEntryItem * next
LibraryForeachIDCallbackFlag usage_flag
MainIDRelationsEntryItem * from_ids
MainIDRelationsEntryItem * to_ids
GHash * relations_from_pointers
UniqueName_Map * name_map_global
MainIDRelations * relations
struct Collection * master_collection
struct bPoseChannel * next
ccl_device_inline bool is_leaf(const ccl_global KernelLightTreeNode *knode)