37 if (temp_lib_context_) {
58 &bmain, blend_file_path, id_type, asset_name, &reports);
60 if (temp_lib_context_ ==
nullptr || temp_lib_context_->
temp_id ==
nullptr) {
66 return temp_lib_context_->
temp_id;
77 MEM_new<AssetTemporaryIDConsumer>(__func__, *handle));
93 if (!(consumer_ && asset_library_ref && bmain && reports)) {
101 return consumer->
import_id(
C, *asset_library_ref, id_type, *bmain, *reports);
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
external readfile function prototypes.
void BLO_library_temp_free(TempLibraryContext *temp_lib_ctx)
TempLibraryContext * BLO_library_temp_load_id(struct Main *real_main, const char *blend_file_path, short idcode, const char *idname, struct ReportList *reports)
#define FILE_MAX_LIBEXTRA
struct ID * ED_asset_handle_get_local_id(const struct AssetHandle *asset)
const char * ED_asset_handle_get_name(const struct AssetHandle *asset)
void ED_asset_handle_get_full_library_path(const struct bContext *C, const struct AssetLibraryReference *asset_library_ref, const struct AssetHandle *asset, char r_full_lib_path[])
struct AssetTempIDConsumer AssetTempIDConsumer
Read Guarded memory(de)allocation.
void ED_asset_temp_id_consumer_free(AssetTempIDConsumer **consumer)
ID * ED_asset_temp_id_consumer_ensure_local_id(AssetTempIDConsumer *consumer_, const bContext *C, const AssetLibraryReference *asset_library_ref, ID_Type id_type, Main *bmain, ReportList *reports)
AssetTempIDConsumer * ED_asset_temp_id_consumer_create(const AssetHandle *handle)
AssetTemporaryIDConsumer(const AssetHandle &handle)
~AssetTemporaryIDConsumer()
ID * import_id(const bContext *C, const AssetLibraryReference &asset_library_ref, ID_Type id_type, Main &bmain, ReportList &reports)
const struct FileDirEntry * file_data
struct AssetMetaData * asset_data