Blender V5.3
on_disk_library.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "on_disk_library.hh"
10
11namespace blender::asset_system {
12
21
22std::optional<AssetLibraryReference> OnDiskAssetLibrary::library_reference() const
23{
25 AssetLibraryReference library_ref{};
26 library_ref.custom_library_index = -1;
27 library_ref.type = ASSET_LIBRARY_LOCAL;
28 return library_ref;
29 }
30
31 BLI_assert_msg(false,
32 "Library references are only available for built-in libraries and libraries "
33 "configured in the Preferences");
34 return {};
35}
36
37std::optional<eAssetImportMethod> OnDiskAssetLibrary::import_method() const
38{
39 return {};
40}
41
46
48{
49 return true;
50}
51
52} // namespace blender::asset_system
#define BLI_assert_msg(a, msg)
eAssetLibraryType library_type() const
AssetLibrary(eAssetLibraryType library_type, bool is_read_only, StringRef name="", StringRef root_path="")
AssetCatalogService & catalog_service() const
std::optional< eAssetImportMethod > import_method() const override
OnDiskAssetLibrary(eAssetLibraryType library_type, StringRef name, StringRef root_path, bool is_read_only)
std::optional< AssetLibraryReference > library_reference() const override
@ ASSET_LIBRARY_LOCAL