40#include "RNA_prototypes.hh"
99 if (reports !=
nullptr) {
104 BlendHandle *blo_handle = lib_context.
blo_handle;
105 if (blo_handle ==
nullptr) {
146 MEM_delete(lapp_context);
165 "Please explicitly clear reference to an embedded blender memfile before "
166 "setting a new one");
180 BlendHandle *blo_handle)
187 lib_context.
path = libname;
214 lapp_context->
items.push_back(item);
216 return &lapp_context->
items.back();
223 const int library_index)
228 int id_code_iter = 0;
233 *lapp_context, lib_context, reports);
235 if (blo_handle ==
nullptr) {
250 blo_handle, id_code, use_assets_only, &id_names_num);
252 for (
LinkNode *link_next =
nullptr; id_names_list !=
nullptr; id_names_list = link_next) {
253 link_next = id_names_list->
next;
255 char *
id_name =
static_cast<char *
>(id_names_list->
link);
257 lapp_context,
id_name, id_code,
nullptr);
259 lapp_context, item, library_index);
265 id_num += id_names_num;
274 const int library_index)
283 return lapp_context->
items.empty();
347 if (!callback_function(lapp_context, &item)) {
412 if (scene->master_collection !=
nullptr &&
425 if (ob->type ==
OB_EMPTY && ob->instance_collection == collection) {
476 bmain, scene->master_collection,
DATA_(
"Linked Data"));
480 bmain, scene->master_collection,
DATA_(
"Appended Data"));
506 if (v3d !=
nullptr) {
519 view_layer->
basact = base;
553 ID *
id = item.new_id;
554 if (
id ==
nullptr ||
GS(id->name) !=
ID_OB) {
560 if (ob->
data !=
nullptr) {
561 (
static_cast<ID *
>(ob->
data))->tag &= ~ID_TAG_DOIT;
563 if (new_ob !=
nullptr && new_ob->
data !=
nullptr) {
564 (
static_cast<ID *
>(new_ob->
data))->tag &= ~ID_TAG_DOIT;
575 parent_collection !=
nullptr;
576 parent_collection = parent_collection->next)
578 if ((parent_collection->collection->id.tag &
ID_TAG_DOIT) != 0) {
598 const bool do_instantiate_as_empty = (lapp_context->
params->
flag &
607 if (
id ==
nullptr ||
GS(id->name) !=
ID_GR) {
629 !collection_is_instantiated;
633 if (!do_add_collection && do_append && !collection_is_instantiated) {
637 do_add_collection =
true;
642 if (do_add_collection) {
651 if (
id ==
nullptr ||
GS(id->name) !=
ID_GR) {
656 bool do_add_collection = (
id->tag &
ID_TAG_DOIT) != 0;
658 if (!do_add_collection) {
663 if (!do_instantiate_as_empty &&
677 if (do_instantiate_as_empty) {
686 const bool set_active = set_selected;
731 const bool object_set_active =
false;
739 if (
id ==
nullptr ||
GS(id->name) !=
ID_OB) {
787 const bool object_set_active =
false;
823 id->tag &= ~ID_TAG_DOIT;
836 if (
id ==
nullptr ||
GS(id->name) !=
ID_OB) {
882 ID *
id = item.new_id;
911 "Local ID '%s' found as part of the linked data hierarchy, this should never happen",
958 if (item ==
nullptr) {
960 data->lapp_context,
BKE_id_name(*
id),
GS(id->name),
nullptr);
971 data->is_liboverride_dependency_only)
976 else if (data->is_liboverride_dependency) {
984 data->is_liboverride_dependency_only)
995 item->
tag &= ~LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY;
1015 if (!data->item->reusable_local_id) {
1029 data->item->reusable_local_id);
1030 data->item->reusable_local_id =
nullptr;
1054 "Appended ID '%s' was to be made directly local, but is also used by data that is "
1055 "kept linked, so duplicating it instead.",
1074 if (!do_recursive) {
1076 ID *
id = item.new_id;
1077 if (
id ==
nullptr) {
1080 direct_libraries.
add(id->lib);
1090 ID *
id = item.new_id;
1091 if (
id ==
nullptr) {
1094 BLI_assert(item.reusable_local_id ==
nullptr);
1111 cb_data.item = &item;
1112 cb_data.reports = reports;
1114 cb_data.is_liboverride_dependency_only = (item.tag &
1131 ID *
id = item.new_id;
1132 if (
id ==
nullptr) {
1140 "Appended ID '%s' is only used as a liboverride linked dependency, keeping it linked.",
1143 item.reusable_local_id =
nullptr;
1147 if (!do_recursive && !direct_libraries.
contains(id->lib)) {
1150 "Appended ID '%s' belongs to another library and recursive append is disabled, "
1151 "keeping it linked.",
1154 item.reusable_local_id =
nullptr;
1168 for (
bool keep_looping = do_reuse_local_id; keep_looping;) {
1169 keep_looping =
false;
1171 ID *
id = item.new_id;
1172 if (
id ==
nullptr) {
1175 if (!item.reusable_local_id) {
1180 cb_data.item = &item;
1181 cb_data.reports = reports;
1183 cb_data.is_liboverride_dependency_only = (item.tag &
1190 if (!item.reusable_local_id) {
1193 keep_looping =
true;
1199 ID *
id = item.new_id;
1200 if (
id ==
nullptr) {
1211 if (do_reuse_local_id && item.reusable_local_id !=
nullptr) {
1212 CLOG_INFO(&
LOG, 3,
"Appended ID '%s' as a matching local one, re-using it.", id->name);
1216 CLOG_INFO(&
LOG, 3,
"Appended ID '%s' was already linked, duplicating it.", id->name);
1223 "Appended ID '%s' is also used as a liboverride linked dependency, duplicating it.",
1232 CLOG_INFO(&
LOG, 3,
"Appended ID '%s' will be made local.", id->name);
1241 ID *
id = item.new_id;
1242 if (
id ==
nullptr) {
1250 cb_data.item = &item;
1251 cb_data.reports = reports;
1253 cb_data.is_liboverride_dependency_only = (item.tag &
1261 if (item.reusable_local_id !=
nullptr &&
1265 "This code should only be reached when the current append operation does not "
1266 "try to reuse local data.");
1270 item.reusable_local_id);
1271 item.reusable_local_id =
nullptr;
1281 if (lapp_context->
items.empty()) {
1292 const int make_local_common_flags =
1312 ID *
id = item.new_id;
1313 if (
id ==
nullptr) {
1317 ID *local_appended_new_id =
nullptr;
1319 STRNCPY(lib_filepath, id->lib->filepath);
1321 STRNCPY(lib_id_name, id->name);
1323 switch (item.action) {
1326 local_appended_new_id =
id->
newid;
1331 local_appended_new_id = id;
1337 BLI_assert(item.reusable_local_id !=
nullptr);
1344 &
LOG,
"Unexpected unset append action for '%s' ID, assuming 'keep link'", id->name);
1350 if (local_appended_new_id !=
nullptr) {
1355 local_appended_new_id);
1376 ID *
id = item.new_id;
1377 if (
id ==
nullptr) {
1383 if (
id ==
nullptr) {
1400 ID *
id = item.new_id;
1401 if (
id ==
nullptr) {
1408 item.new_id =
id->newid;
1466 if (item ==
nullptr) {
1468 data->lapp_context,
BKE_id_name(*
id),
GS(id->name),
nullptr);
1500 ID *
id = item.new_id;
1501 if (
id ==
nullptr) {
1508 cb_data.item = &item;
1509 cb_data.reports = reports;
1520 instantiate_context.active_collection =
nullptr;
1529 if (lapp_context->
items.empty()) {
1541 const char *libname = lib_context.
path.c_str();
1555 lib->id.tag &= ~ID_TAG_MISSING;
1560 "Linking or appending from a very old .blend file format (%d.%d), no animation "
1562 "be done! You may want to re-save your lib file with current Blender",
1572 if (!item.libraries[lib_idx]) {
1577 mainl, &lib_context.
blo_handle, item.idcode, item.name.c_str(), lapp_context->
params);
1582 item.libraries.fill(
false);
1583 item.new_id = new_id;
1584 item.source_library = new_id->
lib;
1608 if (lapp_context->
items.empty()) {
1619 const bool do_use_exisiting_liboverrides = (flags &
1623 if (do_use_exisiting_liboverrides) {
1647 ID *
id = item.new_id;
1648 if (
id ==
nullptr) {
1653 if (do_use_exisiting_liboverrides) {
1654 item.liboverride_id = linked_ids_to_local_liboverrides.
lookup_default(
id,
nullptr);
1656 if (item.liboverride_id ==
nullptr) {
1667 id->tag &= ~ID_TAG_EXTERN;
1686 const bool do_reload,
1687 const int remap_flags)
1698 "Before remap of %s, old_id users: %d, new_id users: %d",
1711 "After remap of %s, old_id users: %d, new_id users: %d",
1725 if (old_id->
us > 0 && new_id && old_id->
lib == new_id->
lib) {
1731 size_t len = strlen(old_id->
name);
1733 bool has_num =
false;
1735 for (dot_pos =
len; dot_pos--;) {
1736 char c = old_id->
name[dot_pos];
1740 if (c <
'0' || c >
'9') {
1748 old_id->
name[dot_pos] =
'~';
1760 "Lib Reload: Replacing all references to old data-block '%s' by reloaded one failed, "
1761 "old one (%d remaining users) had to be kept and was renamed to '%s'",
1771 const bool do_reload)
1786 ID *
id =
static_cast<ID *
>(lbarray[lba_idx]->
first);
1787 const short idcode =
id ?
GS(id->name) : 0;
1795 for (; id;
id =
static_cast<ID *
>(
id->next)) {
1796 if (id->lib == library) {
1804 if (old_key !=
nullptr) {
1812 CLOG_INFO(&
LOG, 4,
"Datablock to seek for: %s", id->name);
1817 if (lapp_context->
items.empty()) {
1835 ID *old_id =
static_cast<ID *
>(item.userdata);
1842 if (old_key !=
nullptr) {
1856 ID *old_id =
static_cast<ID *
>(item.userdata);
1857 ID *new_id = item.new_id;
1860 if (new_id ==
nullptr) {
1865 if (old_key_p ==
nullptr) {
1868 Key *old_key = *old_key_p;
1870 if (old_key !=
nullptr) {
1871 *old_key_p =
nullptr;
1874 bmain, &old_key->
id, &new_key->
id, reports, do_reload, remap_flags);
1875 *old_key_p = old_key;
1892 bool keep_looping =
true;
1893 while (keep_looping) {
1894 keep_looping =
false;
1898 ID *old_id =
static_cast<ID *
>(item.userdata);
1900 if (old_id ==
nullptr) {
1908 item.userdata =
nullptr;
1916 Scene *new_scene =
reinterpret_cast<Scene *
>(item.new_id);
1923 (new_view_layer !=
nullptr) ? new_view_layer : new_scene->
view_layers.
first);
1929 if (old_id->
us == 0) {
1931 item.userdata =
nullptr;
1932 keep_looping =
true;
1934 if (old_key !=
nullptr) {
1949 for (
id =
static_cast<ID *
>(lbarray[lba_idx]->first); id;
id = id_next) {
1950 id_next =
static_cast<ID *
>(
id->next);
1963 for (
id =
static_cast<ID *
>(lbarray[lba_idx]->first); id;
id =
static_cast<ID *
>(
id->next)) {
1971 lib_next =
static_cast<Library *
>(
lib->id.next);
1974 if (
lib->id.us == 0) {
1988 if ((id->override_library->reference->tag &
ID_TAG_MISSING) == 0) {
1989 id->
tag &= ~ID_TAG_MISSING;
@ 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
@ LINK_APPEND_TAG_INDIRECT
@ LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY
@ LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY
eBlendfileLinkAppendForeachItemFlag
@ BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_DIRECT
@ BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_INDIRECT
#define BLENDFILE_LINK_APPEND_INVALID
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)
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)
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)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
void size_t BKE_id_multi_tagged_delete(Main *bmain) ATTR_NONNULL()
void BKE_main_id_tag_idcode(Main *mainvar, short type, int tag, bool value)
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_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_clear_real(ID *id)
void id_us_plus_no_lib(ID *id)
const char * BKE_id_name(const ID &id)
@ 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 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, 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, int flag)
@ ID_REMAP_SKIP_NEVER_NULL_USAGE
@ ID_REMAP_SKIP_INDIRECT_USAGE
void BKE_libblock_relink_to_newid(Main *bmain, ID *id, int remap_flag) ATTR_NONNULL()
void BKE_libblock_remap_locked(Main *bmain, void *old_idv, void *new_idv, int remap_flags) ATTR_NONNULL(1
void BKE_library_main_rebuild_hierarchy(Main *bmain)
#define FOREACH_MAIN_ID_END
ListBase * which_libbase(Main *bmain, short type)
void BKE_main_library_weak_reference_destroy(MainLibraryWeakReferenceMap *library_weak_reference_mapping) ATTR_NONNULL()
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)
int set_listbasepointers(Main *bmain, ListBase *lb[])
#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_namemap_clear(Main *bmain) ATTR_NONNULL()
General operations, lookup, etc. for materials.
void BKE_object_materials_test(struct Main *bmain, struct Object *ob, struct 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(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define STRNCPY(dst, 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_RECURSIVE
@ BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR
@ BLO_LIBLINK_OBDATA_INSTANCE
@ BLO_LIBLINK_APPEND_SET_FAKEUSER
@ BLO_LIBLINK_APPEND_LOCAL_ID_REUSE
@ BLO_LIBLINK_COLLECTION_INSTANCE
#define BLO_EMBEDDED_STARTUP_BLEND
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_read_do_version_after_setup(Main *new_bmain, BlendfileLinkAppendContext *lapp_context, BlendFileReadReport *reports)
void BLO_library_link_end(Main *mainl, BlendHandle **bh, const LibraryLink_Params *params)
external writefile.cc function prototypes.
#define CLOG_ERROR(clg_ref,...)
#define CLOG_INFO(clg_ref, level,...)
ID and Library types, which are fundamental for SDNA.
#define ID_IS_OVERRIDE_LIBRARY_REAL(_id)
#define ID_IS_LINKED(_id)
#define ID_NEW_SET(_id, _idn)
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)
#define BASE_SELECTED(v3d, base)
#define BASE_SELECTABLE(v3d, base)
#define USER_EXPERIMENTAL_TEST(userdef, member)
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 blendfile_library_relocate_remap(Main *bmain, ID *old_id, ID *new_id, ReportList *reports, const bool do_reload, const int remap_flags)
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_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 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)
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 loose_data_instantiate_collection_process(LooseDataInstantiateContext *instantiate_context)
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)
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)
bool add(const Key &key, const Value &value)
const Value & lookup(const Key &key) const
Value lookup_default(const Key &key, const Value &default_value) const
bool remove(const Key &key)
bool contains(const Key &key) const
bool contains(const Key &key) const
constexpr const char * c_str() const
void append(const T &value)
IndexRange index_range() const
void fill(const bool value)
std::string id_name(void *id)
DEGForeachIDComponentCallback callback
void MEM_freeN(void *vmemh)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
unsigned __int64 uint64_t
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
IDOverrideLibrary * override_library
struct Collection * collection
struct LibraryLink_Params::@129 context
struct Library_Runtime runtime
BlendfileLinkAppendContext * lapp_context
Collection * active_collection
struct Collection * instance_collection
unsigned short local_view_uid
static DynamicLibrary lib