Blender V5.0
blender::asset_system::OnDiskAssetLibrary Class Reference

#include <on_disk_library.hh>

Inherits blender::asset_system::AssetLibrary.

Inherited by blender::asset_system::EssentialsAssetLibrary, and blender::asset_system::PreferencesOnDiskAssetLibrary.

Public Member Functions

 OnDiskAssetLibrary (eAssetLibraryType library_type, StringRef name="", StringRef root_path="")
std::optional< AssetLibraryReferencelibrary_reference () const override
void refresh_catalogs () override
Public Member Functions inherited from blender::asset_system::AssetLibrary
 AssetLibrary (eAssetLibraryType library_type, StringRef name="", StringRef root_path="")
virtual ~AssetLibrary ()
void load_or_reload_catalogs ()
AssetCatalogServicecatalog_service () const
std::weak_ptr< AssetRepresentationadd_external_asset (StringRef relative_asset_path, StringRef name, int id_type, std::unique_ptr< AssetMetaData > metadata)
std::weak_ptr< AssetRepresentationadd_local_id_asset (ID &id)
bool remove_asset (AssetRepresentation &asset)
void remap_ids_and_remove_invalid (const blender::bke::id::IDRemapper &mappings)
void refresh_catalog_simplename (AssetMetaData *asset_data)
void on_blend_save_handler_register ()
void on_blend_save_handler_unregister ()
void on_blend_save_post (Main *bmain, PointerRNA **pointers, int num_pointers)
std::string resolve_asset_weak_reference_to_full_path (const AssetWeakReference &asset_reference)
eAssetLibraryType library_type () const
StringRefNull name () const
StringRefNull root_path () const

Additional Inherited Members

Static Public Member Functions inherited from blender::asset_system::AssetLibrary
static void foreach_loaded (FunctionRef< void(AssetLibrary &)> fn, bool include_all_library)
Static Public Attributes inherited from blender::asset_system::AssetLibrary
static bool save_catalogs_when_file_is_saved = true
Protected Attributes inherited from blender::asset_system::AssetLibrary
std::unique_ptr< AssetCatalogServicecatalog_service_
Mutex catalog_service_mutex_
std::optional< eAssetImportMethodimport_method_
bool may_override_import_method_ = false
bool use_relative_path_ = true
bCallbackFuncStore on_save_callback_store_ {}

Detailed Description

Definition at line 15 of file on_disk_library.hh.

Constructor & Destructor Documentation

◆ OnDiskAssetLibrary()

Member Function Documentation

◆ library_reference()

std::optional< AssetLibraryReference > blender::asset_system::OnDiskAssetLibrary::library_reference ( ) const
overridevirtual

Get the AssetLibraryReference referencing this library. This can fail for custom libraries, which have too look up their bUserAssetLibrary. It will not return a value for values that were loaded directly through a path.

Implements blender::asset_system::AssetLibrary.

Reimplemented in blender::asset_system::PreferencesOnDiskAssetLibrary.

Definition at line 21 of file on_disk_library.cc.

References ASSET_LIBRARY_LOCAL, BLI_assert_msg, AssetLibraryReference::custom_library_index, blender::asset_system::AssetLibrary::library_type(), and AssetLibraryReference::type.

◆ refresh_catalogs()

void blender::asset_system::OnDiskAssetLibrary::refresh_catalogs ( )
overridevirtual

The documentation for this class was generated from the following files: