Blender V4.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
9#pragma once
10
11#include "BLI_function_ref.hh"
12
13struct ARegion;
14struct ARegionType;
16struct AssetShelf;
17struct AssetShelfType;
19struct bContext;
20struct BlendDataReader;
21struct BlendWriter;
22struct RegionAssetShelf;
23struct uiLayout;
24
25namespace blender::asset_system {
26class AssetCatalogPath;
27}
28
30
31void build_asset_view(uiLayout &layout,
32 const AssetLibraryReference &library_ref,
33 const AssetShelf &shelf,
34 const bContext &C,
35 const ARegion &region);
36
38void popover_panel_register(ARegionType *region_type);
39
41
42void send_redraw_notifier(const bContext &C);
43
46
47void library_selector_draw(const bContext *C, uiLayout *layout, AssetShelf &shelf);
48
55void regiondata_free(RegionAssetShelf *shelf_regiondata);
56void regiondata_blend_write(BlendWriter *writer, const RegionAssetShelf *shelf_regiondata);
57void regiondata_blend_read_data(BlendDataReader *reader, RegionAssetShelf **shelf_regiondata);
58
59void settings_blend_write(BlendWriter *writer, const AssetShelfSettings &settings);
61
63 const asset_system::AssetCatalogPath &path);
66 const asset_system::AssetCatalogPath &path);
74 const asset_system::AssetCatalogPath &path);
76 const asset_system::AssetCatalogPath &path);
77
79 const AssetShelf &shelf,
80 FunctionRef<void(const asset_system::AssetCatalogPath &catalog_path)> fn);
81
82} // namespace blender::ed::asset::shelf
void build_asset_view(uiLayout &layout, const AssetLibraryReference &library_ref, const AssetShelf &shelf, const bContext &C, const ARegion &region)
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)
void settings_blend_read_data(BlendDataReader *reader, AssetShelfSettings &settings)
void library_selector_draw(const bContext *C, uiLayout *layout, AssetShelf &shelf)
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)
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 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)