|
Blender V5.3
|
#include <remote_library.hh>
Inherits blender::asset_system::AssetLibrary.
Inherited by blender::asset_system::OnlineEssentialsLibrary, and blender::asset_system::PreferencesRemoteAssetLibrary.
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::shared_ptr< AssetCatalogService > | catalog_service_ |
| std::recursive_mutex | catalog_service_mutex_ |
| bool | may_override_import_method_ = false |
| bCallbackFuncStore | on_save_callback_store_ {} |
Abstract class for remote libraries. PreferencesRemoteAssetLibrary and OnlineEssentialsLibrary derive from this.
Definition at line 21 of file remote_library.hh.
| blender::asset_system::RemoteAssetLibrary::RemoteAssetLibrary | ( | eAssetLibraryType | library_type, |
| bool | is_read_only, | ||
| StringRef | remote_url, | ||
| StringRef | name, | ||
| StringRef | root_path ) |
Definition at line 86 of file remote_library.cc.
References blender::asset_system::AssetLibrary::AssetLibrary(), blender::asset_system::AssetLibrary::is_read_only(), blender::asset_system::AssetLibrary::library_type(), blender::asset_system::AssetLibrary::may_override_import_method_, blender::asset_system::AssetLibrary::name(), remote_url(), and blender::asset_system::AssetLibrary::root_path().
Referenced by blender::asset_system::OnlineEssentialsLibrary::OnlineEssentialsLibrary(), and blender::asset_system::PreferencesRemoteAssetLibrary::PreferencesRemoteAssetLibrary().
|
overridevirtual |
(Re-)download the remote listing for this library.
This only has an effect for asset libraries that are themselves a remote library, or contain one (such as the "Essentials" library if it includes online essentials, or the "All" if there are any remote libraries included).
The "Allow Online Access" option will be enforced internally, but probably some check to give a user message should be done at a higher level.
Reimplemented from blender::asset_system::AssetLibrary.
Definition at line 96 of file remote_library.cc.
References blender::asset_system::AssetLibrary::auth_token(), blender::asset_system::remote_library_request_download(), and blender::asset_system::AssetLibrary::root_path().
|
overridevirtual |
Get the import method that should be used for assets in this library.
Implements blender::asset_system::AssetLibrary.
Definition at line 102 of file remote_library.cc.
References blender::ASSET_IMPORT_APPEND_REUSE, blender::ASSET_IMPORT_PACK, and blender::U.
|
overridevirtual |
Load catalogs that have changed on disk.
Reimplemented from blender::asset_system::AssetLibrary.
Definition at line 115 of file remote_library.cc.
References blender::asset_system::AssetLibrary::catalog_service(), and blender::asset_system::AssetCatalogService::reload_catalogs().
|
overridevirtual |
Return the URL of the remote asset library, or #std::nullopt if this is not a remote library.
Note: don't use this as a way to distinguish remote vs. local libraries. Either query the asset itself, or use is_or_contains_remote_libraries(). The Essentials and All libraries may contain a mixture of remote and local assets.
Reimplemented from blender::asset_system::AssetLibrary.
Definition at line 110 of file remote_library.cc.
Referenced by blender::asset_system::PreferencesRemoteAssetLibrary::PreferencesRemoteAssetLibrary(), and RemoteAssetLibrary().