27class OnDiskAssetLibrary;
28class RuntimeAssetLibrary;
44 static std::unique_ptr<AssetLibraryService> instance_;
51 using OnDiskLibraryIdentifier = std::pair<eAssetLibraryType, std::string>;
59 std::unique_ptr<RuntimeAssetLibrary> current_file_library_;
61 std::unique_ptr<AllAssetLibrary> all_library_;
65 static bool atexit_handler_registered_;
153 bool include_all_library)
const;
void tag_all_library_catalogs_dirty()
void app_handler_unregister()
void foreach_loaded_asset_library(FunctionRef< void(AssetLibrary &)> fn, bool include_all_library) const
AssetLibrary * get_asset_library_on_disk_builtin(eAssetLibraryType type, StringRefNull root_path)
AssetLibrary * get_asset_library(const Main *bmain, const AssetLibraryReference &library_reference)
AssetLibrary * find_loaded_on_disk_asset_library_from_name(StringRef name) const
AssetLibrary * get_asset_library_current_file()
AssetLibrary * get_asset_library_on_disk(eAssetLibraryType library_type, StringRef name, StringRefNull root_path)
static bUserAssetLibrary * find_custom_asset_library_from_library_ref(const AssetLibraryReference &library_reference)
void reload_all_library_catalogs_if_dirty()
void app_handler_register()
static void allocate_service_instance()
std::optional< ExplodedPath > resolve_asset_weak_reference_to_exploded_path(const AssetWeakReference &asset_reference)
std::string resolve_asset_weak_reference_to_full_path(const AssetWeakReference &asset_reference)
static AssetLibraryService * get()
AssetLibrary * get_asset_library_on_disk_custom(StringRef name, StringRefNull root_path)
static std::string root_path_from_library_ref(const AssetLibraryReference &library_reference)
std::string normalize_asset_weak_reference_relative_asset_identifier(const AssetWeakReference &asset_reference)
static bUserAssetLibrary * find_custom_preferences_asset_library_from_asset_weak_ref(const AssetWeakReference &asset_reference)
std::string resolve_asset_weak_reference_to_library_path(const AssetWeakReference &asset_reference)
AssetLibraryService()=default
~AssetLibraryService()=default
AssetLibrary * get_asset_library_all(const Main *bmain)
bool has_any_unsaved_catalogs() const
int64_t rfind_blendfile_extension(StringRef path)
StringRef group_component
std::unique_ptr< std::string > full_path