Blender V5.3
asset_shelf.hh
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#pragma once
10
11#include "BLI_function_ref.hh"
12
13namespace blender {
14
15struct ARegion;
16struct ARegionType;
18struct AssetShelf;
19struct AssetShelfType;
21struct bContext;
22struct BlendDataReader;
23struct BlendWriter;
24struct RegionAssetShelf;
25
26namespace asset_system {
28}
29
30namespace ui {
31struct Layout;
32} // namespace ui
33
34namespace ed::asset::shelf {
35
36void build_asset_view(ui::Layout &layout,
37 const AssetLibraryReference &library_ref,
38 const AssetShelf &shelf,
39 const bContext &C);
40
41void catalog_selector_panel_register(ARegionType *region_type);
42void popover_panel_register(ARegionType *region_type);
43
44AssetShelf *active_shelf_from_context(const bContext *C);
45
46void send_redraw_notifier(const bContext &C);
47
48AssetShelfType *ensure_shelf_has_type(AssetShelf &shelf);
49AssetShelf *create_shelf_from_type(AssetShelfType &type);
50
51void library_selector_draw(const bContext *C, ui::Layout &layout, AssetShelf &shelf);
52
57RegionAssetShelf *regiondata_duplicate(const RegionAssetShelf *shelf_regiondata);
59void regiondata_free(RegionAssetShelf *shelf_regiondata);
60void regiondata_blend_write(BlendWriter *writer, const RegionAssetShelf *shelf_regiondata);
61void regiondata_blend_read_data(BlendDataReader *reader, RegionAssetShelf **shelf_regiondata);
62
63void settings_blend_write(BlendWriter *writer, const AssetShelfSettings &settings);
64void settings_blend_read_data(BlendDataReader *reader, AssetShelfSettings &settings);
65
73AssetLibraryReference &settings_ensure_valid_library_ref(AssetShelfSettings &settings);
74
75void settings_set_active_catalog(AssetShelfSettings &settings,
76 const asset_system::AssetCatalogPath &path);
77void settings_set_all_catalog_active(AssetShelfSettings &settings);
78bool settings_is_active_catalog(const AssetShelfSettings &settings,
79 const asset_system::AssetCatalogPath &path);
80bool settings_is_all_catalog_active(const AssetShelfSettings &settings);
85void settings_clear_enabled_catalogs(AssetShelf &shelf);
86bool settings_is_catalog_path_enabled(const AssetShelf &shelf,
87 const asset_system::AssetCatalogPath &path);
88void settings_set_catalog_path_enabled(AssetShelf &shelf,
89 const asset_system::AssetCatalogPath &path);
90
92 const AssetShelf &shelf,
93 FunctionRef<void(const asset_system::AssetCatalogPath &catalog_path)> fn);
94
95} // namespace ed::asset::shelf
96} // namespace blender
#define C
Definition RandGen.cpp:29
void settings_clear_enabled_catalogs(AssetShelf &shelf)
bool settings_is_all_catalog_active(const AssetShelfSettings &settings)
AssetShelf * create_shelf_from_type(AssetShelfType &type)
void popover_panel_register(ARegionType *region_type)
AssetLibraryReference & settings_ensure_valid_library_ref(AssetShelfSettings &settings)
void settings_blend_read_data(BlendDataReader *reader, AssetShelfSettings &settings)
void regiondata_free(RegionAssetShelf *shelf_regiondata)
void settings_foreach_enabled_catalog_path(const AssetShelf &shelf, FunctionRef< void(const asset_system::AssetCatalogPath &catalog_path)> fn)
void catalog_selector_panel_register(ARegionType *region_type)
void settings_set_all_catalog_active(AssetShelfSettings &settings)
AssetShelf * active_shelf_from_context(const bContext *C)
void regiondata_blend_write(BlendWriter *writer, const RegionAssetShelf *shelf_regiondata)
AssetShelfType * ensure_shelf_has_type(AssetShelf &shelf)
bool settings_is_catalog_path_enabled(const AssetShelf &shelf, const asset_system::AssetCatalogPath &path)
void build_asset_view(ui::Layout &layout, const AssetLibraryReference &library_ref, const AssetShelf &shelf, const bContext &C)
bool settings_is_active_catalog(const AssetShelfSettings &settings, const asset_system::AssetCatalogPath &path)
void send_redraw_notifier(const bContext &C)
void settings_set_catalog_path_enabled(AssetShelf &shelf, const asset_system::AssetCatalogPath &path)
void library_selector_draw(const bContext *C, ui::Layout &layout, AssetShelf &shelf)
void settings_blend_write(BlendWriter *writer, const AssetShelfSettings &settings)
void regiondata_blend_read_data(BlendDataReader *reader, RegionAssetShelf **shelf_regiondata)
void settings_set_active_catalog(AssetShelfSettings &settings, const asset_system::AssetCatalogPath &path)
RegionAssetShelf * regiondata_duplicate(const RegionAssetShelf *shelf_regiondata)
BMesh Iterators.