Blender V5.0
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
20
21std::optional<AssetLibraryReference> OnDiskAssetLibrary::library_reference() const
22{
24 AssetLibraryReference library_ref{};
25 library_ref.custom_library_index = -1;
26 library_ref.type = ASSET_LIBRARY_LOCAL;
27 return library_ref;
28 }
29
30 BLI_assert_msg(false,
31 "Library references are only available for built-in libraries and libraries "
32 "configured in the Preferences");
33 return {};
34}
35
40
41} // namespace blender::asset_system
#define BLI_assert_msg(a, msg)
Definition BLI_assert.h:53
eAssetLibraryType
@ ASSET_LIBRARY_LOCAL
eAssetLibraryType library_type() const
AssetCatalogService & catalog_service() const
AssetLibrary(eAssetLibraryType library_type, StringRef name="", StringRef root_path="")
OnDiskAssetLibrary(eAssetLibraryType library_type, StringRef name="", StringRef root_path="")
std::optional< AssetLibraryReference > library_reference() const override