Blender
V3.3
|
#include <BKE_asset_catalog.hh>
Public Member Functions | |
void | insert_item (const AssetCatalog &catalog) |
void | foreach_item (const AssetCatalogTreeItem::ItemIterFn callback) |
void | foreach_root_item (const ItemIterFn callback) |
Protected Attributes | |
ChildMap | root_items_ |
A representation of the catalog paths as tree structure. Each component of the catalog tree is represented by an #AssetCatalogTreeItem. The last path component of an item is used as its name, which may also be shown to the user. An item can not have multiple children with the same name. That means the name uniquely identifies an item within its parent.
There is no single root tree element, the #AssetCatalogTree instance itself represents the root.
Definition at line 340 of file BKE_asset_catalog.hh.
void blender::bke::AssetCatalogTree::foreach_item | ( | const AssetCatalogTreeItem::ItemIterFn | callback | ) |
Definition at line 780 of file blenkernel/intern/asset_catalog.cc.
References callback, and root_items_.
void blender::bke::AssetCatalogTree::foreach_root_item | ( | const ItemIterFn | callback | ) |
Iterate over root items calling callback for each of them, but do not recurse into their children.
Definition at line 785 of file blenkernel/intern/asset_catalog.cc.
References callback, and root_items_.
Referenced by blender::ed::asset_browser::AssetCatalogTreeView::build_tree().
void blender::bke::AssetCatalogTree::insert_item | ( | const AssetCatalog & | catalog | ) |
Ensure an item representing path is in the tree, adding it if necessary.
Definition at line 743 of file blenkernel/intern/asset_catalog.cc.
References BLI_assert_msg, BLI_uuid_is_nil(), blender::bke::AssetCatalog::catalog_id, blender::bke::AssetCatalogTreeItem::children_, ELEM, blender::bke::AssetCatalog::flags, blender::bke::AssetCatalog::Flags::has_unsaved_changes, if(), blender::bke::AssetCatalog::Flags::is_first_loaded, blender::bke::AssetCatalogPath::iterate_components(), blender::bke::AssetCatalog::path, root_items_, blender::bke::AssetCatalog::simple_name, and blender::bke::AssetCatalogPath::str().
|
protected |
Child tree items, ordered by their names.
Definition at line 355 of file BKE_asset_catalog.hh.
Referenced by foreach_item(), foreach_root_item(), and insert_item().