Blender V4.3
blender::asset_system::AssetCatalogTreeItem Class Reference

#include <AS_asset_catalog_tree.hh>

Public Types

using ChildMap = std::map<std::string, AssetCatalogTreeItem>
 
using ItemIterFn = FunctionRef<void(const AssetCatalogTreeItem &)>
 

Public Member Functions

 AssetCatalogTreeItem (StringRef name, CatalogID catalog_id, StringRef simple_name, const AssetCatalogTreeItem *parent=nullptr)
 
CatalogID get_catalog_id () const
 
StringRefNull get_simple_name () const
 
StringRefNull get_name () const
 
bool has_unsaved_changes () const
 
AssetCatalogPath catalog_path () const
 
int count_parents () const
 
bool has_children () const
 
void foreach_child (ItemIterFn callback) const
 

Friends

class AssetCatalogTree
 

Detailed Description

Representation of a catalog path in the AssetCatalogTree.

Definition at line 28 of file AS_asset_catalog_tree.hh.

Member Typedef Documentation

◆ ChildMap

Container for child items. Uses a #std::map to keep items ordered by their name (i.e. their last catalog component).

Definition at line 32 of file AS_asset_catalog_tree.hh.

◆ ItemIterFn

Constructor & Destructor Documentation

◆ AssetCatalogTreeItem()

blender::asset_system::AssetCatalogTreeItem::AssetCatalogTreeItem ( StringRef name,
CatalogID catalog_id,
StringRef simple_name,
const AssetCatalogTreeItem * parent = nullptr )

Definition at line 13 of file asset_catalog_tree.cc.

Member Function Documentation

◆ catalog_path()

AssetCatalogPath blender::asset_system::AssetCatalogTreeItem::catalog_path ( ) const

Return the full catalog path, defined as the name of this catalog prefixed by the full catalog path of its parent and a separator.

Definition at line 40 of file asset_catalog_tree.cc.

Referenced by blender::ed::space_node::add_root_catalogs_draw(), blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive(), blender::ed::asset_browser::AssetCatalogTreeViewItem::build_context_menu(), blender::ed::asset::build_filtered_all_catalog_tree(), blender::ed::asset::build_filtered_catalog_tree(), blender::ed::asset_browser::AssetCatalogTreeViewItem::build_row(), blender::ed::asset_browser::AssetCatalogDropTarget::can_drop(), blender::ed::geometry::catalog_assets_draw(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::catalog_path(), blender::asset_system::tests::compare_item_with_path(), blender::ed::asset::draw_menu_for_catalog(), blender::asset_system::tests::AssetCatalogTreeTestFunctions::expect_tree_item_child_items(), blender::asset_system::tests::AssetCatalogTreeTestFunctions::expect_tree_items(), blender::asset_system::tests::AssetCatalogTreeTestFunctions::expect_tree_root_items(), blender::asset_system::AssetCatalogTree::find_item(), blender::asset_system::AssetCatalogTree::find_root_item(), blender::ed::space_node::node_add_catalog_assets_draw(), blender::ed::object::ui_template_modifier_asset_menu_items(), blender::ed::space_node::ui_template_node_asset_menu_items(), blender::ed::geometry::ui_template_node_operator_asset_menu_items(), blender::ed::geometry::ui_template_node_operator_asset_root_items(), and blender::ed::sculpt_paint::visit_library_catalogs_catalog_for_search().

◆ count_parents()

int blender::asset_system::AssetCatalogTreeItem::count_parents ( ) const

◆ foreach_child()

◆ get_catalog_id()

◆ get_name()

◆ get_simple_name()

StringRefNull blender::asset_system::AssetCatalogTreeItem::get_simple_name ( ) const

◆ has_children()

bool blender::asset_system::AssetCatalogTreeItem::has_children ( ) const

◆ has_unsaved_changes()

bool blender::asset_system::AssetCatalogTreeItem::has_unsaved_changes ( ) const

Friends And Related Symbol Documentation

◆ AssetCatalogTree

friend class AssetCatalogTree
friend

Definition at line 50 of file AS_asset_catalog_tree.hh.


The documentation for this class was generated from the following files: