Blender  V3.3
BKE_asset_library.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #ifndef __cplusplus
10 # error This is a C++-only header file. Use BKE_asset_library.h instead.
11 #endif
12 
13 #include "BKE_asset_library.h"
14 
15 #include "BKE_asset_catalog.hh"
16 #include "BKE_callbacks.h"
17 
18 #include <memory>
19 
20 namespace blender::bke {
21 
26 struct AssetLibrary {
27  /* Controlled by #ED_asset_catalogs_set_save_catalogs_when_file_is_saved,
28  * for managing the "Save Catalog Changes" in the quit-confirmation dialog box. */
30 
31  std::unique_ptr<AssetCatalogService> catalog_service;
32 
33  AssetLibrary();
34  ~AssetLibrary();
35 
36  void load(StringRefNull library_root_directory);
37 
39  void refresh();
40 
47  void refresh_catalog_simplename(struct AssetMetaData *asset_data);
48 
51 
52  void on_blend_save_post(struct Main *, struct PointerRNA **pointers, int num_pointers);
53 
54  private:
55  bCallbackFuncStore on_save_callback_store_{};
56 };
57 
58 } // namespace blender::bke
59 
struct AssetLibrary AssetLibrary
blender::bke::AssetCatalogService * BKE_asset_library_get_catalog_service(const ::AssetLibrary *library)
blender::bke::AssetCatalogTree * BKE_asset_library_get_catalog_tree(const ::AssetLibrary *library)
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
Definition: BKE_main.h:121
static bool save_catalogs_when_file_is_saved
void load(StringRefNull library_root_directory)
void on_blend_save_post(struct Main *, struct PointerRNA **pointers, int num_pointers)
std::unique_ptr< AssetCatalogService > catalog_service
void refresh_catalog_simplename(struct AssetMetaData *asset_data)
static FT_Library library