|
Blender V4.3
|
#include <list>#include <string>#include "BLI_bit_vector.hh"#include "BLI_function_ref.hh"#include "BLI_map.hh"#include "BLO_readfile.hh"Go to the source code of this file.
Classes | |
| struct | BlendfileLinkAppendContextItem |
| struct | BlendfileLinkAppendContextLibrary |
| struct | BlendfileLinkAppendContext |
Macros | |
| #define | BLENDFILE_LINK_APPEND_INVALID -1 |
Enumerations | |
| enum | { LINK_APPEND_ACT_UNSET = 0 , LINK_APPEND_ACT_KEEP_LINKED , LINK_APPEND_ACT_REUSE_LOCAL , LINK_APPEND_ACT_MAKE_LOCAL , LINK_APPEND_ACT_COPY_LOCAL } |
| enum | { LINK_APPEND_TAG_INDIRECT = 1 << 0 , LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY = 1 << 1 , LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY = 1 << 2 } |
| enum | eBlendfileLinkAppendForeachItemFlag { BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_DIRECT = 1 << 0 , BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_INDIRECT = 1 << 1 } |
| enum | eBKELibLinkOverride { BKE_LIBLINK_OVERRIDE_INIT = 0 , BKE_LIBLINK_OVERRIDE_USE_EXISTING_LIBOVERRIDES = 1 << 0 , BKE_LIBLINK_OVERRIDE_CREATE_RUNTIME = 1 << 1 } |
| #define BLENDFILE_LINK_APPEND_INVALID -1 |
Definition at line 234 of file BKE_blendfile_link_append.hh.
Referenced by BKE_blendfile_link_append_context_item_idtypes_from_library_add(), BKE_copybuffer_paste(), and BKE_copybuffer_read().
| anonymous enum |
Actions to apply to an item (i.e. linked ID).
| Enumerator | |
|---|---|
| LINK_APPEND_ACT_UNSET | |
| LINK_APPEND_ACT_KEEP_LINKED | |
| LINK_APPEND_ACT_REUSE_LOCAL | |
| LINK_APPEND_ACT_MAKE_LOCAL | |
| LINK_APPEND_ACT_COPY_LOCAL | |
Definition at line 31 of file BKE_blendfile_link_append.hh.
| anonymous enum |
Various status info about an item (i.e. linked ID).
| Enumerator | |
|---|---|
| LINK_APPEND_TAG_INDIRECT | An indirectly linked ID. |
| LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY | An ID also used as liboverride dependency (either directly, as a liboverride reference, or indirectly, as data used by a liboverride reference). It should never be directly made local. Mutually exclusive with LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY. |
| LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY | An ID only used as liboverride dependency (either directly or indirectly, see LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY for precisions). It should not be considered during the 'make local' process, and remain purely linked data. Mutually exclusive with LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY. |
Definition at line 40 of file BKE_blendfile_link_append.hh.
| enum eBKELibLinkOverride |
Options controlling the behavior of liboverrides creation.
| Enumerator | |
|---|---|
| BKE_LIBLINK_OVERRIDE_INIT | |
| BKE_LIBLINK_OVERRIDE_USE_EXISTING_LIBOVERRIDES | Try to find a matching existing liboverride first, instead of always creating a new one.
|
| BKE_LIBLINK_OVERRIDE_CREATE_RUNTIME | Create (or return an existing) runtime liboverride, instead of a regular saved-in-blend-files one. See also the ID_TAG_RUNTIME tag of IDs in DNA_ID.h.
|
Definition at line 351 of file BKE_blendfile_link_append.hh.
Definition at line 284 of file BKE_blendfile_link_append.hh.
| void BKE_blendfile_append | ( | BlendfileLinkAppendContext * | lapp_context, |
| ReportList * | reports ) |
Perform append operation, using modern ID usage looper to detect which ID should be kept linked, made local, duplicated as local, re-used from local etc.
The IDs processed by this functions are the one that have been linked by a previous call to BKE_blendfile_link on the same lapp_context.
Definition at line 1276 of file blendfile_link_append.cc.
References BlendfileLinkAppendContext::Appending, BKE_id_multi_tagged_delete(), BKE_idtype_idcode_append_is_reusable(), BKE_lib_id_make_local(), BKE_libblock_relink_to_newid(), BKE_main_id_newptr_and_tag_clear(), BKE_main_id_tag_all(), BKE_main_library_weak_reference_add_item(), BKE_main_library_weak_reference_create(), BKE_main_library_weak_reference_destroy(), blendfile_append_define_actions(), BLI_assert, BLI_assert_unreachable, BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR, BLO_LIBLINK_APPEND_RECURSIVE, BLO_LIBLINK_APPEND_SET_FAKEUSER, BLO_read_do_version_after_setup(), LibraryLink_Params::bmain, CLOG_ERROR, ELEM, FILE_LINK, FILE_MAX, LibraryLink_Params::flag, GS, id_fake_user_set(), ID_GR, ID_IS_LINKED, ID_NEW_SET, ID_OB, ID_TAG_DOIT, ID_TAG_PRE_EXISTING, BlendfileLinkAppendContext::items, LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR, LIB_ID_MAKELOCAL_FORCE_COPY, LIB_ID_MAKELOCAL_FORCE_LOCAL, LIB_ID_MAKELOCAL_FULL_LIBRARY, LIB_ID_MAKELOCAL_LIBOVERRIDE_CLEAR, BlendfileLinkAppendContext::library_weak_reference_mapping, LINK_APPEND_ACT_COPY_LOCAL, LINK_APPEND_ACT_KEEP_LINKED, LINK_APPEND_ACT_MAKE_LOCAL, LINK_APPEND_ACT_REUSE_LOCAL, LINK_APPEND_ACT_UNSET, LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY, LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY, BlendfileLinkAppendContext::Linking, LOG, MAX_ID_NAME, ID::name, new_id_to_item_mapping_create(), ID::newid, BlendfileLinkAppendContext::params, BlendfileLinkAppendContext::process_stage, BlendFileReadReport::reports, and STRNCPY.
Referenced by bpy_lib_exit(), copybuffer_append(), wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| void BKE_blendfile_library_relocate | ( | BlendfileLinkAppendContext * | lapp_context, |
| ReportList * | reports, | ||
| Library * | library, | ||
| bool | do_reload ) |
Try to relocate all linked IDs added to lapp_context, belonging to the given library.
This function searches for matching IDs (type and name) in all libraries added to the given lapp_context.
Typical usages include:
lapp_context.lapp_contextlapp_context.lapp_context.NOTE: content of lapp_context after execution of that function should not be assumed valid anymore, and should immediately be freed.
Definition at line 1768 of file blendfile_link_append.cc.
References BKE_blendfile_link(), BKE_blendfile_link_append_context_init_done(), BKE_blendfile_link_append_context_item_add(), BKE_id_delete(), BKE_id_free(), BKE_id_multi_tagged_delete(), BKE_id_name(), BKE_idtype_idcode_is_linkable(), BKE_key_from_id(), BKE_key_from_id_p(), BKE_layer_collection_resync_allow(), BKE_layer_collection_resync_forbid(), BKE_lib_override_library_main_operations_create(), BKE_lib_override_library_main_resync(), BKE_lib_override_library_update(), BKE_library_main_rebuild_hierarchy(), BKE_main_collection_sync(), BKE_main_collection_sync_remap(), BKE_main_id_refcount_recompute(), BKE_main_id_tag_all(), BKE_main_id_tag_idcode(), BKE_main_lock(), BKE_main_unlock(), BKE_view_layer_find(), blendfile_library_relocate_remap(), BLI_addtail(), BLI_assert, BLI_remlink(), LibraryLink_Params::bmain, CLOG_INFO, LibraryLink_Params::context, blender::bits::BitVector< InlineBufferCapacity, Allocator >::fill(), ListBase::first, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, Key::id, Library::id, Scene::id, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY_REAL, ID_KE, ID_LI, ID_REMAP_SKIP_INDIRECT_USAGE, ID_REMAP_SKIP_NEVER_NULL_USAGE, ID_SCE, ID_TAG_DOIT, ID_TAG_MISSING, ID_TAG_PRE_EXISTING, id_us_clear_real(), id_us_min(), id_us_plus_no_lib(), INDEX_ID_MAX, BlendfileLinkAppendContext::items, ID::lib, lib, BlendfileLinkAppendContextItem::libraries, LOG, ID::name, ViewLayer::name, BlendfileLinkAppendContext::params, BlendFileReadReport::reports, LibraryLink_Params::scene, set_listbasepointers(), ID::tag, ID::us, USER_EXPERIMENTAL_TEST, LibraryLink_Params::view_layer, Scene::view_layers, and which_libbase().
Referenced by WM_lib_reload(), and wm_lib_relocate_exec_do().
| void BKE_blendfile_link | ( | BlendfileLinkAppendContext * | lapp_context, |
| ReportList * | reports ) |
Perform linking operation on all items added to given lapp_context.
Definition at line 1524 of file blendfile_link_append.cc.
References BKE_reportf(), BLI_assert, BlendfileLinkAppendContextLibrary::blo_handle, BLO_library_link_begin(), BLO_library_link_end(), BLO_library_link_named_part(), BLO_read_do_version_after_setup(), LibraryLink_Params::bmain, Main::curlib, FILE_LINK, LibraryLink_Params::flag, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), BlendfileLinkAppendContext::Init, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), BlendfileLinkAppendContext::items, ID::lib, lib, BlendfileLinkAppendContext::libraries, link_append_context_library_blohandle_ensure(), link_append_context_library_blohandle_release(), BlendfileLinkAppendContext::Linking, BlendfileLinkAppendContext::params, BlendfileLinkAppendContextLibrary::path, BlendfileLinkAppendContext::process_stage, BlendFileReadReport::reports, RPT_WARNING, Main::subversionfile, and Main::versionfile.
Referenced by blender::bke::asset_link_id(), BKE_blendfile_library_relocate(), bpy_lib_exit(), copybuffer_append(), wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| void BKE_blendfile_link_append_context_embedded_blendfile_clear | ( | BlendfileLinkAppendContext * | lapp_context | ) |
Clear reference to Blender's embedded startup file into the context.
Definition at line 171 of file blendfile_link_append.cc.
References BlendfileLinkAppendContext::blendfile_mem, and BlendfileLinkAppendContext::blendfile_memsize.
| void BKE_blendfile_link_append_context_embedded_blendfile_set | ( | BlendfileLinkAppendContext * | lapp_context, |
| const void * | blendfile_mem, | ||
| int | blendfile_memsize ) |
Store reference to a Blender's embedded memfile into the context.
ED module, which cannot be linked in BKE code. Definition at line 161 of file blendfile_link_append.cc.
References BlendfileLinkAppendContext::blendfile_mem, BlendfileLinkAppendContext::blendfile_memsize, and BLI_assert_msg.
Referenced by wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| void BKE_blendfile_link_append_context_finalize | ( | BlendfileLinkAppendContext * | lapp_context | ) |
Finalize the link/append process.
NOTE: Currently only used to call the matching handler..
Definition at line 362 of file blendfile_link_append.cc.
References BlendfileLinkAppendContext::Appending, BKE_callback_exec(), BKE_CB_EVT_BLENDIMPORT_POST, BLI_assert, LibraryLink_Params::bmain, BlendfileLinkAppendContext::Done, ELEM, BlendfileLinkAppendContext::Instantiating, BlendfileLinkAppendContext::Linking, BlendfileLinkAppendContext::params, BlendfileLinkAppendContext::process_stage, and RNA_pointer_create().
Referenced by blender::bke::asset_link_id(), bpy_lib_exit(), copybuffer_append(), wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| void BKE_blendfile_link_append_context_flag_set | ( | BlendfileLinkAppendContext * | lapp_context, |
| int | flag, | ||
| bool | do_set ) |
Set or clear flags in given lapp_context.
| flag | A combination of:
|
| do_set | Set the given flag if true, clear it otherwise. |
Definition at line 149 of file blendfile_link_append.cc.
References flag, LibraryLink_Params::flag, and BlendfileLinkAppendContext::params.
Referenced by blender::bke::asset_link_id(), and wm_lib_relocate_exec_do().
| void BKE_blendfile_link_append_context_free | ( | BlendfileLinkAppendContext * | lapp_context | ) |
Free a link/append context.
Definition at line 138 of file blendfile_link_append.cc.
References BLI_assert, BlendfileLinkAppendContext::libraries, BlendfileLinkAppendContext::library_weak_reference_mapping, and link_append_context_library_blohandle_release().
Referenced by blender::bke::asset_link_id(), BKE_copybuffer_paste(), BKE_copybuffer_read(), bpy_lib_exit(), wm_file_link_append_datablock_ex(), WM_lib_reload(), wm_lib_relocate_exec_do(), and wm_link_append_exec().
| void BKE_blendfile_link_append_context_init_done | ( | BlendfileLinkAppendContext * | lapp_context | ) |
Called once the link/append process has been fully initialized (all of its data has been set).
NOTE: Currently only used to call the matching handler.
Definition at line 353 of file blendfile_link_append.cc.
References BKE_callback_exec(), BKE_CB_EVT_BLENDIMPORT_PRE, BLI_assert, LibraryLink_Params::bmain, BlendfileLinkAppendContext::Init, BlendfileLinkAppendContext::params, BlendfileLinkAppendContext::process_stage, and RNA_pointer_create().
Referenced by blender::bke::asset_link_id(), BKE_blendfile_library_relocate(), bpy_lib_exit(), copybuffer_append(), wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| bool BKE_blendfile_link_append_context_is_empty | ( | BlendfileLinkAppendContext * | lapp_context | ) |
Check if given link/append context is empty (has no items to process) or not.
Definition at line 281 of file blendfile_link_append.cc.
References BlendfileLinkAppendContext::items.
Referenced by wm_link_append_exec().
| BlendfileLinkAppendContextItem * BKE_blendfile_link_append_context_item_add | ( | BlendfileLinkAppendContext * | lapp_context, |
| const char * | idname, | ||
| short | idcode, | ||
| void * | userdata ) |
Add a new item (data-block name and idcode) to be searched and linked/appended from libraries associated to the given context.
| userdata | an opaque user-data pointer stored in generated link/append item. |
TODO: Add a more friendly version of this that combines it with the call to BKE_blendfile_link_append_context_item_library_index_enable to enable the added item for all added library sources.
Definition at line 196 of file blendfile_link_append.cc.
References BlendfileLinkAppendContextItem::action, BlendfileLinkAppendContextItem::idcode, BlendfileLinkAppendContext::items, BlendfileLinkAppendContextItem::lapp_context, BlendfileLinkAppendContext::libraries, BlendfileLinkAppendContextItem::libraries, LINK_APPEND_ACT_UNSET, BlendfileLinkAppendContextItem::name, BlendfileLinkAppendContextItem::new_id, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and BlendfileLinkAppendContextItem::userdata.
Referenced by blender::bke::asset_link_id(), BKE_blendfile_library_relocate(), BKE_blendfile_link_append_context_item_idtypes_from_library_add(), bpy_lib_exit(), foreach_libblock_append_add_dependencies_callback(), foreach_libblock_link_finalize_cb(), wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| void BKE_blendfile_link_append_context_item_foreach | ( | BlendfileLinkAppendContext * | lapp_context, |
| blender::FunctionRef< bool(BlendfileLinkAppendContext *lapp_context, BlendfileLinkAppendContextItem *item)> | callback_function, | ||
| eBlendfileLinkAppendForeachItemFlag | flag ) |
Iterate over all (or a subset) of the items listed in given BlendfileLinkAppendContext, and call the callback_function on them.
| flag | Control which type of items to process (see eBlendfileLinkAppendForeachItemFlag enum flags). |
| userdata | An opaque void pointer passed to the callback_function. |
| callback_function | Called over each (or a subset of each) of the items in given BlendfileLinkAppendContext. |
true if iteration should continue, false otherwise. Definition at line 329 of file blendfile_link_append.cc.
References BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_DIRECT, BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_INDIRECT, flag, BlendfileLinkAppendContext::items, LINK_APPEND_TAG_INDIRECT, and BlendfileLinkAppendContextItem::tag.
Referenced by bpy_lib_exit(), and blender::bke::greasepencil::convert::legacy_main().
| short BKE_blendfile_link_append_context_item_idcode_get | ( | BlendfileLinkAppendContext * | lapp_context, |
| BlendfileLinkAppendContextItem * | item ) |
Definition at line 323 of file blendfile_link_append.cc.
References BlendfileLinkAppendContextItem::idcode.
Referenced by bpy_lib_exit_lapp_context_items_cb().
| int BKE_blendfile_link_append_context_item_idtypes_from_library_add | ( | BlendfileLinkAppendContext * | lapp_context, |
| ReportList * | reports, | ||
| uint64_t | id_types_filter, | ||
| int | library_index ) |
Search for all ID matching given id_types_filter in given library_index, and add them to the list of items to process.
lapp_context after this function.| id_types_filter | A set of FILTER_ID bitflags, the types of IDs to add to the items list. |
| library_index | The index of the library to look into, in given lapp_context. |
BLENDFILE_LINK_APPEND_INVALID if it could not open the .blend file. Definition at line 219 of file blendfile_link_append.cc.
References BKE_blendfile_link_append_context_item_add(), BKE_blendfile_link_append_context_item_library_index_enable(), BKE_idtype_idcode_is_linkable(), BKE_idtype_idcode_iter_step(), BKE_idtype_idcode_to_idfilter(), BLENDFILE_LINK_APPEND_INVALID, BLI_assert, BLO_blendhandle_get_datablock_names(), FILE_ASSETS_ONLY, LibraryLink_Params::flag, id_name(), BlendfileLinkAppendContext::Init, BlendfileLinkAppendContext::libraries, LinkNode::link, link_append_context_library_blohandle_ensure(), MEM_freeN(), LinkNode::next, BlendfileLinkAppendContext::params, and BlendfileLinkAppendContext::process_stage.
Referenced by BKE_copybuffer_paste(), and BKE_copybuffer_read().
| ID * BKE_blendfile_link_append_context_item_liboverrideid_get | ( | BlendfileLinkAppendContext * | lapp_context, |
| BlendfileLinkAppendContextItem * | item ) |
Definition at line 315 of file blendfile_link_append.cc.
References BLI_assert, BlendfileLinkAppendContext::Init, BlendfileLinkAppendContextItem::liboverride_id, BlendfileLinkAppendContext::process_stage, and UNUSED_VARS_NDEBUG.
Referenced by bpy_lib_exit_lapp_context_items_cb().
| void BKE_blendfile_link_append_context_item_library_index_enable | ( | BlendfileLinkAppendContext * | lapp_context, |
| BlendfileLinkAppendContextItem * | item, | ||
| int | library_index ) |
Enable search of the given item into the library stored at given index in the link/append context.
Definition at line 271 of file blendfile_link_append.cc.
References BLI_assert, BlendfileLinkAppendContext::Init, BlendfileLinkAppendContextItem::libraries, BlendfileLinkAppendContext::process_stage, and UNUSED_VARS_NDEBUG.
Referenced by blender::bke::asset_link_id(), BKE_blendfile_link_append_context_item_idtypes_from_library_add(), bpy_lib_exit(), wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| ID * BKE_blendfile_link_append_context_item_newid_get | ( | BlendfileLinkAppendContext * | lapp_context, |
| BlendfileLinkAppendContextItem * | item ) |
Definition at line 292 of file blendfile_link_append.cc.
References BLI_assert, BlendfileLinkAppendContext::Init, BlendfileLinkAppendContextItem::new_id, BlendfileLinkAppendContext::process_stage, and UNUSED_VARS_NDEBUG.
Referenced by blender::bke::asset_link_id(), bpy_lib_exit_lapp_context_items_cb(), and wm_file_link_append_datablock_ex().
| void BKE_blendfile_link_append_context_item_newid_set | ( | BlendfileLinkAppendContext * | lapp_context, |
| BlendfileLinkAppendContextItem * | item, | ||
| ID * | new_id ) |
Replace the newly linked ID by another from the same library. Rarely used, necessary e.g. in some complex 'do version after setup' code when an ID is replaced by another one.
Definition at line 300 of file blendfile_link_append.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BLI_assert, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), BlendfileLinkAppendContext::Init, ID::lib, BlendfileLinkAppendContextItem::liboverride_id, BlendfileLinkAppendContextItem::new_id, BlendfileLinkAppendContext::new_id_to_item, BlendfileLinkAppendContext::process_stage, and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
Referenced by blender::bke::greasepencil::convert::legacy_main().
| void * BKE_blendfile_link_append_context_item_userdata_get | ( | BlendfileLinkAppendContext * | lapp_context, |
| BlendfileLinkAppendContextItem * | item ) |
Definition at line 286 of file blendfile_link_append.cc.
References BlendfileLinkAppendContextItem::userdata.
Referenced by bpy_lib_exit_lapp_context_items_cb().
| void BKE_blendfile_link_append_context_library_add | ( | BlendfileLinkAppendContext * | lapp_context, |
| const char * | libname, | ||
| BlendHandle * | blo_handle ) |
Add a new source library to search for items to be linked to the given link/append context.
| libname | the absolute path to the library blend file. |
| blo_handle | the blend file handle of the library, nullptr if not available. Note that the ownership of this handle is always stolen, because readfile code may forcefully clear this handle after reading in some cases (endianness conversion, see usages of the FD_FLAGS_SWITCH_ENDIAN flag). |
Definition at line 178 of file blendfile_link_append.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_assert, BlendfileLinkAppendContextLibrary::blo_handle, BlendfileLinkAppendContextLibrary::blo_handle_is_owned, BlendfileLinkAppendContext::Init, BlendfileLinkAppendContext::items, BlendfileLinkAppendContext::libraries, BlendfileLinkAppendContextLibrary::path, and BlendfileLinkAppendContext::process_stage.
Referenced by blender::bke::asset_link_id(), BKE_copybuffer_paste(), BKE_copybuffer_read(), bpy_lib_exit(), wm_file_link_append_datablock_ex(), WM_lib_reload(), wm_lib_relocate_exec_do(), and wm_link_append_exec().
| BlendfileLinkAppendContext * BKE_blendfile_link_append_context_new | ( | LibraryLink_Params * | params | ) |
Allocate and initialize a new context to link/append data-blocks.
Definition at line 130 of file blendfile_link_append.cc.
References BlendfileLinkAppendContext::Init, BlendfileLinkAppendContext::params, params, and BlendfileLinkAppendContext::process_stage.
Referenced by blender::bke::asset_link_id(), BKE_copybuffer_paste(), BKE_copybuffer_read(), bpy_lib_exit(), wm_file_link_append_datablock_ex(), WM_lib_reload(), wm_lib_relocate_exec_do(), and wm_link_append_exec().
| void BKE_blendfile_link_append_instantiate_loose | ( | BlendfileLinkAppendContext * | lapp_context, |
| ReportList * | reports ) |
Instantiate loose data in the scene (e.g. add object to the active collection).
Definition at line 1481 of file blendfile_link_append.cc.
References BlendfileLinkAppendContext::Appending, BKE_library_foreach_ID_link(), BLI_assert, LibraryLink_Params::bmain, LibraryLink_Params::context, ELEM, FILE_LINK, LibraryLink_Params::flag, foreach_libblock_link_finalize_cb(), IDWALK_NOP, BlendfileLinkAppendContext::Instantiating, BlendfileLinkAppendContext::items, BlendfileLinkAppendContextCallBack::lapp_context, LooseDataInstantiateContext::lapp_context, BlendfileLinkAppendContext::Linking, loose_data_instantiate(), new_id_to_item_mapping_create(), BlendfileLinkAppendContext::params, BlendfileLinkAppendContext::process_stage, and LibraryLink_Params::scene.
Referenced by copybuffer_append(), wm_file_link_append_datablock_ex(), and wm_link_append_exec().
| void BKE_blendfile_override | ( | BlendfileLinkAppendContext * | lapp_context, |
| const eBKELibLinkOverride | flags, | ||
| ReportList * | reports ) |
Create (or find existing) liboverrides from linked data.
The IDs processed by this functions are the one that have been linked by a previous call to BKE_blendfile_link on the same lapp_context.
Control over how liboverrides are created is done through the extra eBKELibLinkOverride flags.
Definition at line 1604 of file blendfile_link_append.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_lib_override_library_create_from_id(), BKE_LIBLINK_OVERRIDE_CREATE_RUNTIME, BKE_LIBLINK_OVERRIDE_USE_EXISTING_LIBOVERRIDES, BKE_main_namemap_clear(), BLI_assert, LibraryLink_Params::bmain, FILE_LINK, LibraryLink_Params::flag, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY_REAL, ID_TAG_INDIRECT, ID_TAG_PRE_EXISTING, ID_TAG_RUNTIME, BlendfileLinkAppendContext::items, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), ID::override_library, BlendfileLinkAppendContext::params, IDOverrideLibrary::reference, and ID::tag.
Referenced by bpy_lib_exit().