25 const std::optional<eAssetImportMethod> import_method,
26 const std::optional<ImportInstantiateContext> instantiate_context,
29 if (
ID *local_id =
asset.local_id()) {
33 std::string blend_path =
asset.full_library_path();
34 if (blend_path.empty()) {
39 const bool no_packing =
U.experimental.no_data_block_packing;
44 if (std::optional asset_method =
asset.get_import_method()) {
51 Scene *scene = instantiate_context ? instantiate_context->scene :
nullptr;
52 ViewLayer *view_layer = instantiate_context ? instantiate_context->view_layer :
nullptr;
53 View3D *
view3d = instantiate_context ? instantiate_context->view3d :
nullptr;
63 asset.get_name().c_str(),
73 asset.get_name().c_str(),
84 asset.get_name().c_str(),
96 asset.get_name().c_str(),
Main runtime representation of an asset.
external readfile function prototypes.
#define BLI_assert_unreachable()
ID * asset_local_id_ensure_imported(Main &bmain, const asset_system::AssetRepresentation &asset, int flags=0, const std::optional< eAssetImportMethod > import_method=std::nullopt, const std::optional< ImportInstantiateContext > instantiate_context=std::nullopt, ReportList *reports=nullptr)
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, ReportList *reports)
@ BLO_LIBLINK_APPEND_LOCAL_ID_REUSE
@ BLO_LIBLINK_APPEND_RECURSIVE
@ BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR
@ ASSET_IMPORT_APPEND_REUSE
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, ReportList *reports)