42#include "RNA_prototypes.hh"
103 if (reports !=
nullptr) {
108 BlendHandle *blo_handle = lib_context.
blo_handle;
109 if (blo_handle ==
nullptr) {
150 MEM_delete(lapp_context);
169 "Please explicitly clear reference to an embedded blender memfile before "
170 "setting a new one");
184 BlendHandle *blo_handle)
191 lib_context.
path = libname;
218 lapp_context->
items.push_back(item);
220 return &lapp_context->
items.back();
227 const int library_index)
232 int id_code_iter = 0;
237 *lapp_context, lib_context, reports);
239 if (blo_handle ==
nullptr) {
254 blo_handle, id_code, use_assets_only, &id_names_num);
256 for (
LinkNode *link_next =
nullptr; id_names_list !=
nullptr; id_names_list = link_next) {
257 link_next = id_names_list->
next;
259 char *id_name =
static_cast<char *
>(id_names_list->
link);
261 lapp_context, id_name, id_code,
nullptr);
263 lapp_context, item, library_index);
269 id_num += id_names_num;
278 const int library_index)
287 return lapp_context->
items.empty();
351 if (!callback_function(lapp_context, &item)) {
418 if (scene->master_collection !=
nullptr &&
431 if (ob->type ==
OB_EMPTY && ob->instance_collection == collection) {
512 if (v3d !=
nullptr) {
525 view_layer->
basact = base;
560 if (
id ==
nullptr ||
GS(
id->name) !=
ID_OB) {
566 if (ob->
data !=
nullptr) {
569 if (new_ob !=
nullptr && new_ob->
data !=
nullptr) {
581 parent_collection !=
nullptr;
582 parent_collection = parent_collection->
next)
584 if ((parent_collection->collection->id.tag &
ID_TAG_DOIT) != 0) {
604 const bool do_instantiate_as_empty = (lapp_context->
params->
flag &
613 if (
id ==
nullptr ||
GS(
id->name) !=
ID_GR) {
635 !collection_is_instantiated;
639 if (!do_add_collection && do_append && !collection_is_instantiated) {
643 do_add_collection =
true;
648 if (do_add_collection) {
657 if (
id ==
nullptr ||
GS(
id->name) !=
ID_GR) {
662 bool do_add_collection = (
id->tag &
ID_TAG_DOIT) != 0;
664 if (!do_add_collection) {
669 if (!do_instantiate_as_empty &&
683 if (do_instantiate_as_empty) {
692 const bool set_active = set_selected;
737 const bool do_object_active_done = (lapp_context->
params->
flag &
742 bool object_set_active =
false;
750 if (
id ==
nullptr ||
GS(
id->name) !=
ID_OB) {
800 const bool object_set_active =
false;
849 if (
id ==
nullptr ||
GS(
id->name) !=
ID_OB) {
924 "Local ID '%s' found as part of the linked data hierarchy, this should never happen",
976 linked_ids_to_delete.
add(id_iter);
980 if (item ==
nullptr) {
1014 linked_ids_to_delete.
remove(
id);
1043 if (item ==
nullptr) {
1056 data->is_liboverride_dependency_only)
1061 else if (
data->is_liboverride_dependency) {
1069 data->is_liboverride_dependency_only)
1100 if (!
data->item->reusable_local_id) {
1114 data->item->reusable_local_id);
1115 data->item->reusable_local_id =
nullptr;
1138 "Appended ID '%s' was to be made directly local, but is also used by data that is "
1139 "kept linked, so duplicating it instead.",
1158 if (!do_recursive) {
1161 if (
id ==
nullptr) {
1164 direct_libraries.
add(
id->lib);
1175 if (
id ==
nullptr) {
1195 cb_data.
item = &item;
1216 if (
id ==
nullptr) {
1223 "Appended ID '%s' is only used as a liboverride linked dependency, keeping it linked.",
1230 if (!do_recursive && !direct_libraries.
contains(
id->lib)) {
1232 "Appended ID '%s' belongs to another library and recursive append is disabled, "
1233 "keeping it linked.",
1250 for (
bool keep_looping = do_reuse_local_id; keep_looping;) {
1251 keep_looping =
false;
1254 if (
id ==
nullptr) {
1262 cb_data.
item = &item;
1275 keep_looping =
true;
1282 if (
id ==
nullptr) {
1294 CLOG_DEBUG(&
LOG,
"Appended ID '%s' as a matching local one, re-using it.",
id->name);
1298 CLOG_DEBUG(&
LOG,
"Appended ID '%s' was already linked, duplicating it.",
id->name);
1304 "Appended ID '%s' is also used as a liboverride linked dependency, duplicating it.",
1314 CLOG_DEBUG(&
LOG,
"Appended ID '%s' is a liboverride, duplicating it.",
id->name);
1332 if (
id ==
nullptr) {
1340 cb_data.
item = &item;
1355 "This code should only be reached when the current append operation does not "
1356 "try to reuse local data.");
1371 if (lapp_context->
items.empty()) {
1382 const int make_local_common_flags =
1403 if (
id ==
nullptr) {
1407 ID *local_appended_new_id =
nullptr;
1409 STRNCPY(lib_filepath,
id->lib->filepath);
1416 local_appended_new_id =
id->
newid;
1421 local_appended_new_id =
id;
1434 &
LOG,
"Unexpected unset append action for '%s' ID, assuming 'keep link'",
id->name);
1440 if (local_appended_new_id !=
nullptr) {
1445 local_appended_new_id);
1467 if (
id ==
nullptr) {
1473 if (
id ==
nullptr) {
1491 if (
id ==
nullptr) {
1558 if (item ==
nullptr) {
1593 if (
id ==
nullptr) {
1600 cb_data.
item = &item;
1621 if (lapp_context->
items.empty()) {
1633 const char *libname = lib_context.
path.c_str();
1652 "Linking or appending from a very old .blend file format (%d.%d), no animation "
1654 "be done! You may want to re-save your lib file with current Blender",
1702 if (lapp_context->
items.empty()) {
1713 const bool do_use_exisiting_liboverrides = (flags &
1717 if (do_use_exisiting_liboverrides) {
1742 if (
id ==
nullptr) {
1747 if (do_use_exisiting_liboverrides) {
1781 const bool do_reload)
1791 "Before remap of %s, old_id users: %d, new_id users: %d",
1795 remapper.
add(old_id, new_id);
1804 if (old_key_p ==
nullptr) {
1807 Key *old_key = *old_key_p;
1809 if (old_key !=
nullptr) {
1810 old_owner_id_to_shapekey.
add(old_id, &old_key->
id);
1811 *old_key_p =
nullptr;
1813 remapper.
add(&old_key->
id, &new_key->
id);
1823 const bool do_reload)
1829 Key *old_key =
reinterpret_cast<Key *
>(
1833 *old_key_p = old_key;
1844 "After remap of %s, old_id users: %d, new_id users: %d",
1857 if (old_id->
us > 0 && old_id->
lib == new_id->
lib) {
1863 size_t len = strlen(old_id->
name);
1865 bool has_num =
false;
1867 for (dot_pos =
len; dot_pos--;) {
1868 char c = old_id->
name[dot_pos];
1872 if (c <
'0' || c >
'9') {
1880 old_id->
name[dot_pos] =
'~';
1892 "Lib Reload: Replacing all references to old data-block '%s' by reloaded one failed, "
1893 "old one (%d remaining users) had to be kept and was renamed to '%s'",
1902 const bool do_reload,
1903 const int remap_flags)
1917 remapper, old_owner_id_to_shapekey, old_id, new_id, do_reload);
1933 "On library reload, placeholders should be generated when a linked ID is "
1934 "missing, so there should never be a nullptr 'new_id' here");
1941 bmain, old_owner_id_to_shapekey, old_id, new_id, reports, do_reload);
1961 bool keep_looping =
true;
1962 while (keep_looping) {
1963 keep_looping =
false;
1968 if (old_id ==
nullptr) {
1991 (new_view_layer !=
nullptr) ? new_view_layer : new_scene->
view_layers.
first);
1997 if (old_id->
us == 0) {
1998 ids_to_delete.
add(old_id);
2000 keep_looping =
true;
2002 if (old_key !=
nullptr) {
2003 ids_to_delete.
add(&old_key->
id);
2008 ids_to_delete.
clear();
2016 ids_to_delete.
add(id_iter);
2021 ids_to_delete.
clear();
2026 ids_to_delete.
add(id_iter);
2073 &new_to_old_libraries_map,
2085 const bool do_reload)
2096 int lba_idx = lbarray.size();
2098 ID *
id =
static_cast<ID *
>(lbarray[lba_idx]->first);
2099 const short idcode =
id ?
GS(
id->name) : 0;
2107 for (;
id;
id =
static_cast<ID *
>(
id->next)) {
2116 if (old_key !=
nullptr) {
2129 if (lapp_context->
items.empty()) {
2160 if (old_key !=
nullptr) {
2182 new_to_old_libraries_map.
add(new_id->
lib, old_id->
lib);
2209 if (lapp_context.
items.empty()) {
2245 new_to_old_libraries_map.
add(new_id->
lib, old_id->
lib);
@ BKE_LIBLINK_OVERRIDE_USE_EXISTING_LIBOVERRIDES
@ BKE_LIBLINK_OVERRIDE_CREATE_RUNTIME
@ LINK_APPEND_ACT_MAKE_LOCAL
@ LINK_APPEND_ACT_REUSE_LOCAL
@ LINK_APPEND_ACT_KEEP_LINKED
@ LINK_APPEND_ACT_COPY_LOCAL
eBlendfileLinkAppendForeachItemFlag
@ BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_DIRECT
@ BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_INDIRECT
#define BLENDFILE_LINK_APPEND_INVALID
@ LINK_APPEND_TAG_INDIRECT
@ LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY
@ LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY
void BKE_callback_exec(Main *bmain, PointerRNA **pointers, int num_pointers, eCbEvent evt)
@ BKE_CB_EVT_BLENDIMPORT_POST
@ BKE_CB_EVT_BLENDIMPORT_PRE
bool BKE_collection_has_object_recursive(Collection *collection, Object *ob)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
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_child_add(Main *bmain, Collection *parent, Collection *child)
Collection * BKE_collection_parent_editable_find_recursive(const ViewLayer *view_layer, Collection *collection)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
void BKE_main_collections_parent_relations_rebuild(Main *bmain)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
uint64_t BKE_idtype_idcode_to_idfilter(short idcode)
bool BKE_idtype_idcode_is_linkable(short idcode)
short BKE_idtype_idcode_iter_step(int *idtype_index)
bool BKE_idtype_idcode_append_is_reusable(short idcode)
Key ** BKE_key_from_id_p(ID *id)
Key * BKE_key_from_id(ID *id)
LayerCollection * BKE_layer_collection_get_active(ViewLayer *view_layer)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
void BKE_layer_collection_resync_forbid()
void BKE_main_collection_sync_remap(const Main *bmain)
void BKE_layer_collection_resync_allow()
ViewLayer * BKE_view_layer_find(const Scene *scene, const char *layer_name)
void BKE_main_collection_sync(const Main *bmain)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
@ LIB_ID_MAKELOCAL_FORCE_LOCAL
@ LIB_ID_MAKELOCAL_LIBOVERRIDE_CLEAR
@ LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR
@ LIB_ID_MAKELOCAL_FULL_LIBRARY
@ LIB_ID_MAKELOCAL_FORCE_COPY
void size_t BKE_id_multi_tagged_delete(Main *bmain) ATTR_NONNULL()
size_t BKE_id_multi_delete(Main *bmain, blender::Set< ID * > &ids_to_delete)
void id_sort_by_name(ListBase *lb, ID *id, ID *id_sorting_hint)
void id_fake_user_set(ID *id)
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
bool BKE_lib_id_make_local(Main *bmain, ID *id, int flags)
void id_fake_user_clear(ID *id)
void id_us_plus_no_lib(ID *id)
const char * BKE_id_name(const ID &id)
void BKE_main_id_refcount_recompute(Main *bmain, bool do_linked_only)
void BKE_main_id_tag_all(Main *mainvar, int tag, bool value)
ID * BKE_lib_override_library_create_from_id(Main *bmain, ID *reference_id, bool do_tagged_remap)
void BKE_lib_override_library_update(Main *bmain, ID *local)
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)
void BKE_lib_override_library_main_operations_create(Main *bmain, bool force_auto, int *r_report_flags)
@ IDWALK_CB_EMBEDDED_NOT_OWNING
@ IDWALK_CB_OVERRIDE_LIBRARY_REFERENCE
void BKE_library_foreach_ID_link(Main *bmain, ID *id, blender::FunctionRef< LibraryIDLinkCallback > callback, void *user_data, LibraryForeachIDFlag flag)
void BKE_libblock_remap_multiple_locked(Main *bmain, blender::bke::id::IDRemapper &mappings, const int remap_flags)
void BKE_libblock_relink_to_newid(Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
@ ID_REMAP_SKIP_NEVER_NULL_USAGE
@ ID_REMAP_SKIP_INDIRECT_USAGE
void BKE_library_main_rebuild_hierarchy(Main *bmain)
#define FOREACH_MAIN_ID_END
MainListsArray BKE_main_lists_get(Main &bmain)
ListBase * which_libbase(Main *bmain, short type)
void BKE_main_library_weak_reference_destroy(MainLibraryWeakReferenceMap *library_weak_reference_mapping) ATTR_NONNULL()
std::array< ListBase *, INDEX_ID_MAX - 1 > MainListsArray
ID * BKE_main_library_weak_reference_search_item(MainLibraryWeakReferenceMap *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name) ATTR_NONNULL()
void BKE_main_lock(Main *bmain)
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
MainLibraryWeakReferenceMap * BKE_main_library_weak_reference_create(Main *bmain) ATTR_NONNULL()
void BKE_main_unlock(Main *bmain)
void BKE_main_library_weak_reference_remove_item(MainLibraryWeakReferenceMap *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *old_id) ATTR_NONNULL()
void BKE_main_library_weak_reference_add_item(MainLibraryWeakReferenceMap *library_weak_reference_mapping, const char *library_filepath, const char *library_id_name, ID *new_id) ATTR_NONNULL()
void BKE_main_ensure_invariants(Main &bmain, std::optional< blender::Span< ID * > > modified_ids=std::nullopt)
void BKE_main_namemap_clear(Main &bmain)
General operations, lookup, etc. for materials.
void BKE_object_materials_sync_length(Main *bmain, Object *ob, ID *id)
General operations, lookup, etc. for blender objects.
Object * BKE_object_add_only_object(Main *bmain, int type, const char *name) ATTR_RETURNS_NONNULL
int BKE_object_obdata_to_type(const ID *id) ATTR_NONNULL(1)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
API for Blender-side Rigid Body stuff.
void BKE_rigidbody_ensure_local_object(struct Main *bmain, struct Object *ob)
void BKE_scene_object_base_flag_sync_from_base(Base *base)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE void copy_v3_v3(float r[3], const float a[3])
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
#define UNUSED_VARS_NDEBUG(...)
@ BLO_LIBLINK_APPEND_SET_OB_ACTIVE_CLIPBOARD
@ BLO_LIBLINK_APPEND_RECURSIVE
@ BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR
@ BLO_LIBLINK_OBDATA_INSTANCE
@ BLO_LIBLINK_APPEND_SET_FAKEUSER
@ BLO_LIBLINK_COLLECTION_NO_HIERARCHY_REBUILD
@ BLO_LIBLINK_APPEND_LOCAL_ID_REUSE
@ BLO_LIBLINK_COLLECTION_INSTANCE
#define BLO_EMBEDDED_STARTUP_BLEND
void BLO_library_link_end(Main *mainl, BlendHandle **bh, const LibraryLink_Params *params, ReportList *reports)
BlendHandle * BLO_blendhandle_from_file(const char *filepath, BlendFileReadReport *reports)
BlendHandle * BLO_blendhandle_from_memory(const void *mem, int memsize, BlendFileReadReport *reports)
void BLO_blendhandle_close(BlendHandle *bh) ATTR_NONNULL(1)
ID * BLO_library_link_named_part(Main *mainl, BlendHandle **bh, short idcode, const char *name, const LibraryLink_Params *params)
LinkNode * BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype, bool use_assets_only, int *r_tot_names)
Main * BLO_library_link_begin(BlendHandle **bh, const char *filepath, const LibraryLink_Params *params)
void BLO_readfile_id_runtime_data_free_all(Main &bmain)
void BLO_read_do_version_after_setup(Main *new_bmain, BlendfileLinkAppendContext *lapp_context, BlendFileReadReport *reports)
external writefile.cc function prototypes.
#define CLOG_ERROR(clg_ref,...)
#define CLOG_DEBUG(clg_ref,...)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_PACKED(_id)
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_LINKED(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
#define ID_NEW_SET(_id, _idn)
@ LIBRARY_FLAG_IS_ARCHIVE
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
#define OB_DATA_SUPPORT_ID(_id_type)
@ OB_FLAG_ACTIVE_CLIPBOARD
#define BASE_SELECTED(v3d, base)
#define BASE_SELECTABLE(v3d, base)
Read Guarded memory(de)allocation.
void BKE_blendfile_link_append_context_finalize(BlendfileLinkAppendContext *lapp_context)
static BlendHandle * link_append_context_library_blohandle_ensure(BlendfileLinkAppendContext &lapp_context, BlendfileLinkAppendContextLibrary &lib_context, ReportList *reports)
static void loose_data_instantiate_object_base_instance_init(Main *bmain, Collection *collection, Object *ob, const Scene *scene, ViewLayer *view_layer, const View3D *v3d, const int flag, bool set_active)
static bool foreach_libblock_link_append_common_processing(LibraryIDLinkCallbackData *cb_data, blender::FunctionRef< LibraryIDLinkCallback > callback)
void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *reports)
BlendfileLinkAppendContextItem * BKE_blendfile_link_append_context_item_add(BlendfileLinkAppendContext *lapp_context, const char *idname, const short idcode, void *userdata)
static ID * loose_data_instantiate_process_check(LooseDataInstantiateContext *instantiate_context, BlendfileLinkAppendContextItem *item)
void * BKE_blendfile_link_append_context_item_userdata_get(BlendfileLinkAppendContext *, BlendfileLinkAppendContextItem *item)
void BKE_blendfile_link_append_context_library_add(BlendfileLinkAppendContext *lapp_context, const char *libname, BlendHandle *blo_handle)
bool BKE_blendfile_link_append_context_is_empty(BlendfileLinkAppendContext *lapp_context)
static void loose_data_instantiate_ensure_active_collection(LooseDataInstantiateContext *instantiate_context)
static void loose_data_instantiate_obdata_process(LooseDataInstantiateContext *instantiate_context)
void BKE_blendfile_link_append_context_flag_set(BlendfileLinkAppendContext *lapp_context, const int flag, const bool do_set)
int BKE_blendfile_link_append_context_item_idtypes_from_library_add(BlendfileLinkAppendContext *lapp_context, ReportList *reports, const uint64_t id_types_filter, const int library_index)
static void loose_data_instantiate_object_rigidbody_postprocess(LooseDataInstantiateContext *instantiate_context)
void BKE_blendfile_link_append_context_item_foreach(BlendfileLinkAppendContext *lapp_context, blender::FunctionRef< bool(BlendfileLinkAppendContext *lapp_context, BlendfileLinkAppendContextItem *item)> callback_function, const eBlendfileLinkAppendForeachItemFlag flag)
void BKE_blendfile_link_append_context_item_library_index_enable(BlendfileLinkAppendContext *lapp_context, BlendfileLinkAppendContextItem *item, const int library_index)
static int foreach_libblock_append_ensure_reusable_local_id_callback(LibraryIDLinkCallbackData *cb_data)
static bool object_in_any_collection(Main *bmain, Object *ob)
void BKE_blendfile_id_relocate(BlendfileLinkAppendContext &lapp_context, ReportList *reports)
void BKE_blendfile_override(BlendfileLinkAppendContext *lapp_context, const eBKELibLinkOverride flags, ReportList *)
static int foreach_libblock_append_finalize_action_callback(LibraryIDLinkCallbackData *cb_data)
void BKE_blendfile_link_append_context_embedded_blendfile_clear(BlendfileLinkAppendContext *lapp_context)
static int foreach_libblock_link_finalize_cb(LibraryIDLinkCallbackData *cb_data)
void BKE_blendfile_link_append_context_free(BlendfileLinkAppendContext *lapp_context)
void BKE_blendfile_append(BlendfileLinkAppendContext *lapp_context, ReportList *reports)
void BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context, ReportList *reports, Library *library, const bool do_reload)
static void blendfile_library_relocate_id_remap_prepare(id::IDRemapper &remapper, blender::Map< ID *, ID * > &old_owner_id_to_shapekey, ID *old_id, ID *new_id, const bool do_reload)
static void blendfile_relocate_postprocess_liboverrides(BlendfileLinkAppendContext &lapp_context, const blender::Map< Library *, Library * > &new_to_old_libraries_map, ReportList *reports)
static bool object_in_any_scene(Main *bmain, Object *ob)
static int foreach_libblock_append_add_dependencies_callback(LibraryIDLinkCallbackData *cb_data)
static void blendfile_append_define_actions(BlendfileLinkAppendContext &lapp_context, ReportList *reports)
static void blendfile_relocate_postprocess_cleanup(BlendfileLinkAppendContext &lapp_context)
void BKE_blendfile_link_append_instantiate_loose(BlendfileLinkAppendContext *lapp_context, ReportList *reports)
static void loose_data_instantiate_obdata_preprocess(LooseDataInstantiateContext *instantiate_context)
void BKE_blendfile_link_append_context_embedded_blendfile_set(BlendfileLinkAppendContext *lapp_context, const void *blendfile_mem, int blendfile_memsize)
static void link_append_context_library_blohandle_release(BlendfileLinkAppendContext &, BlendfileLinkAppendContextLibrary &lib_context)
static bool collection_instantiated_by_any_object(Main *bmain, Collection *collection)
BlendfileLinkAppendContext * BKE_blendfile_link_append_context_new(LibraryLink_Params *params)
static void blendfile_library_relocate_id_remap_finalize(Main *bmain, blender::Map< ID *, ID * > &old_owner_id_to_shapekey, ID *old_id, ID *new_id, ReportList *reports, const bool do_reload)
static void loose_data_instantiate_collection_process(LooseDataInstantiateContext *instantiate_context)
static void blendfile_library_relocate_id_remap(BlendfileLinkAppendContext &lapp_context, ReportList *reports, const bool do_reload, const int remap_flags)
static bool loose_data_instantiate_collection_parents_check_recursive(Collection *collection)
static void new_id_to_item_mapping_create(BlendfileLinkAppendContext &lapp_context)
void BKE_blendfile_link_append_context_item_newid_set(BlendfileLinkAppendContext *lapp_context, BlendfileLinkAppendContextItem *item, ID *new_id)
short BKE_blendfile_link_append_context_item_idcode_get(BlendfileLinkAppendContext *, BlendfileLinkAppendContextItem *item)
ID * BKE_blendfile_link_append_context_item_liboverrideid_get(BlendfileLinkAppendContext *lapp_context, BlendfileLinkAppendContextItem *item)
static void loose_data_instantiate_object_process(LooseDataInstantiateContext *instantiate_context)
void BKE_blendfile_link_pack(BlendfileLinkAppendContext *lapp_context, ReportList *)
static void new_id_to_item_mapping_add(BlendfileLinkAppendContext &lapp_context, ID *id, BlendfileLinkAppendContextItem &item)
void BKE_blendfile_link_append_context_init_done(BlendfileLinkAppendContext *lapp_context)
ID * BKE_blendfile_link_append_context_item_newid_get(BlendfileLinkAppendContext *lapp_context, BlendfileLinkAppendContextItem *item)
static void loose_data_instantiate(LooseDataInstantiateContext *instantiate_context)
BMesh const char void * data
unsigned long long int uint64_t
bool add(const Key &key, const Value &value)
Value lookup_default(const Key &key, const Value &default_value) const
bool remove(const Key &key)
bool contains(const Key &key) const
void append(const T &value)
IndexRange index_range() const
bool add(const Key &key, const Value &value)
Value lookup_default(const Key &key, const Value &default_value) const
Value lookup_default_as(const ForwardKey &key, ForwardValue &&...default_value) const
bool contains(const Key &key) const
bool remove(const Key &key)
constexpr const char * c_str() const
void fill(const bool value)
void add(ID *old_id, ID *new_id)
void MEM_freeN(void *vmemh)
bool is_auto_resync_enabled()
void pack_linked_id_hierarchy(Main &bmain, ID &root_id)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
unsigned short local_view_bits
bool is_liboverride_dependency
bool is_liboverride_dependency_only
BlendfileLinkAppendContext * lapp_context
BlendfileLinkAppendContextItem * item
blender::BitVector libraries
BlendfileLinkAppendContext * lapp_context
BlendFileReadReport bf_reports
MainLibraryWeakReferenceMap * library_weak_reference_mapping
const void * blendfile_mem
LibraryLink_Params * params
blender::Map< ID *, BlendfileLinkAppendContextItem * > new_id_to_item
ProcessStage process_stage
blender::Vector< BlendfileLinkAppendContextLibrary > libraries
std::list< BlendfileLinkAppendContextItem > items
struct CollectionParent * next
CollectionRuntimeHandle * runtime
IDOverrideLibrary * override_library
struct Collection * collection
LibraryForeachIDCallbackFlag cb_flag
struct LibraryLink_Params::@222023026213166106233022062076164023171015125015 context
LibraryRuntimeHandle * runtime
struct Library * archive_parent_library
BlendfileLinkAppendContext * lapp_context
Collection * active_collection
struct Collection * instance_collection
struct Collection * master_collection
unsigned short local_view_uid
static DynamicLibrary lib