23 const std::optional<eAssetImportMethod> import_method)
25 if (
ID *local_id =
asset.local_id()) {
29 std::string blend_path =
asset.full_library_path();
30 if (blend_path.empty()) {
35 const bool no_packing =
U.experimental.no_data_block_packing;
40 if (std::optional asset_method =
asset.get_import_method()) {
55 asset.get_name().c_str(),
64 asset.get_name().c_str(),
74 asset.get_name().c_str(),
85 asset.get_name().c_str(),
Main runtime representation of an asset.
#define BLI_assert_unreachable()
external readfile function prototypes.
@ BLO_LIBLINK_APPEND_RECURSIVE
@ BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR
@ BLO_LIBLINK_APPEND_LOCAL_ID_REUSE
@ ASSET_IMPORT_APPEND_REUSE
ID * asset_local_id_ensure_imported(Main &bmain, const asset_system::AssetRepresentation &asset, const std::optional< eAssetImportMethod > import_method=std::nullopt)
ID * WM_file_append_datablock(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const char *filepath, const short id_code, const char *id_name, int flag)
ID * WM_file_link_datablock(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d, const char *filepath, const short id_code, const char *id_name, int flag)