Blender V5.0
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
13struct ARegion;
14struct ARegionType;
16struct AssetShelf;
17struct AssetShelfType;
19struct bContext;
20struct BlendDataReader;
21struct BlendWriter;
22struct RegionAssetShelf;
23struct uiLayout;
24
25namespace blender::asset_system {
27}
28
30
31void build_asset_view(uiLayout &layout,
32 const AssetLibraryReference &library_ref,
33 const AssetShelf &shelf,
34 const bContext &C);
35
36void catalog_selector_panel_register(ARegionType *region_type);
37void popover_panel_register(ARegionType *region_type);
38
39AssetShelf *active_shelf_from_context(const bContext *C);
40
41void send_redraw_notifier(const bContext &C);
42
43AssetShelfType *ensure_shelf_has_type(AssetShelf &shelf);
44AssetShelf *create_shelf_from_type(AssetShelfType &type);
45
46void library_selector_draw(const bContext *C, uiLayout *layout, AssetShelf &shelf);
47
54void regiondata_free(RegionAssetShelf *shelf_regiondata);
55void regiondata_blend_write(BlendWriter *writer, const RegionAssetShelf *shelf_regiondata);
56void regiondata_blend_read_data(BlendDataReader *reader, RegionAssetShelf **shelf_regiondata);
57
58void settings_blend_write(BlendWriter *writer, const AssetShelfSettings &settings);
59void settings_blend_read_data(BlendDataReader *reader, AssetShelfSettings &settings);
60
62 const asset_system::AssetCatalogPath &path);
65 const asset_system::AssetCatalogPath &path);
73 const asset_system::AssetCatalogPath &path);
75 const asset_system::AssetCatalogPath &path);
76
78 const AssetShelf &shelf,
79 FunctionRef<void(const asset_system::AssetCatalogPath &catalog_path)> fn);
80
81} // namespace blender::ed::asset::shelf
struct AssetLibraryReference AssetLibraryReference
struct AssetShelf AssetShelf
struct RegionAssetShelf RegionAssetShelf
struct AssetShelfSettings AssetShelfSettings
#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)
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)
void build_asset_view(uiLayout &layout, const AssetLibraryReference &library_ref, const AssetShelf &shelf, const bContext &C)
RegionAssetShelf * regiondata_duplicate(const RegionAssetShelf *shelf_regiondata)