49 bool is_read_only_ =
true;
61 std::shared_ptr<std::string> root_path_;
82 Mutex external_assets_mutex;
87 Mutex local_id_assets_mutex;
89 AssetStorage asset_storage_;
187 virtual std::optional<StringRefNull>
remote_url()
const;
189 virtual std::optional<StringRefNull>
auth_token()
const;
220 std::unique_ptr<AssetMetaData>
metadata);
229 std::unique_ptr<AssetMetaData>
metadata,
375 const char *library_dirpath);
411 char r_path_buffer[ 1282],
Main runtime representation of an asset.
void on_blend_save_post(Main *bmain, PointerRNA **pointers, int num_pointers)
void load_or_reload_catalogs()
static bool save_catalogs_when_file_is_saved
eAssetLibraryType library_type() const
void on_blend_save_handler_register()
std::shared_ptr< AssetCatalogService > catalog_service_
friend class AssetLibraryService
virtual bool use_relative_paths() const
bool may_override_import_method_
virtual const bUserAssetLibrary * user_asset_library() const
std::shared_ptr< AssetCatalogService > catalog_service_ptr() const
std::weak_ptr< AssetRepresentation > add_local_id_asset(ID &id)
friend class AssetRepresentation
virtual std::optional< StringRefNull > remote_url() const
std::weak_ptr< AssetRepresentation > add_external_on_disk_asset(StringRef relative_asset_path, StringRef name, int id_type, std::unique_ptr< AssetMetaData > metadata)
std::weak_ptr< AssetRepresentation > add_external_online_asset(StringRef relative_asset_path, StringRef name, int id_type, std::unique_ptr< AssetMetaData > metadata, OnlineAssetInfo online_info)
std::recursive_mutex catalog_service_mutex_
AssetLibrary(eAssetLibraryType library_type, bool is_read_only, StringRef name="", StringRef root_path="")
bool is_read_only() const
bCallbackFuncStore on_save_callback_store_
AssetCatalogService & catalog_service() const
void remap_ids_and_remove_invalid(const bke::id::IDRemapper &mappings)
static void foreach_loaded(FunctionRef< void(AssetLibrary &)> fn, bool include_all_library)
virtual std::optional< StringRefNull > auth_token() const
virtual std::optional< eAssetImportMethod > import_method() const =0
bool remove_asset(AssetRepresentation &asset)
void refresh_catalog_simplename(AssetMetaData *asset_data)
std::string resolve_asset_weak_reference_to_full_path(const AssetWeakReference &asset_reference)
StringRefNull name() const
StringRefNull root_path() const
virtual void refresh_catalogs()
void on_blend_save_handler_unregister()
virtual void force_remote_listing_download() const
virtual std::optional< AssetLibraryReference > library_reference() const =0
AssetLibraryReference all_library_reference()
AssetLibraryReference essentials_library_reference()
AssetLibraryReference current_file_library_reference()
void all_library_reload_catalogs_if_dirty()
Vector< AssetLibraryReference > all_valid_asset_library_refs()
void all_library_tag_catalogs_dirty()
bool is_or_contains_remote_libraries(const AssetLibraryReference &reference)
bool contains_assets_from_remote_url(const AssetLibrary &library, StringRef remote_url)
AssetLibraryReference online_essentials_library_reference()
std::string AS_asset_library_find_suitable_root_path_from_path(StringRefNull input_path)
bool AS_asset_library_has_any_unsaved_catalogs()
void AS_asset_full_path_explode_from_weak_ref(const AssetWeakReference *asset_reference, char r_path_buffer[1282], char **r_dir, char **r_group, char **r_name)
std::string AS_asset_library_resolve_path(StringRef path)
std::string AS_asset_library_find_suitable_root_path_from_main(const Main *bmain)
void AS_asset_library_import_method_ensure_valid(Main &bmain)
void AS_asset_libraries_exit()
asset_system::AssetLibrary * AS_asset_library_load(const Main *bmain, const AssetLibraryReference &library_reference)
void AS_asset_library_remap_ids(const bke::id::IDRemapper &mappings)
std::string AS_asset_library_root_path_from_library_ref(const AssetLibraryReference &library_reference)
asset_system::AssetLibrary * AS_asset_library_load_from_directory(const char *name, const char *library_dirpath)