|
Blender V4.3
|
#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 |
Representation of a catalog path in the AssetCatalogTree.
Definition at line 28 of file AS_asset_catalog_tree.hh.
| using blender::asset_system::AssetCatalogTreeItem::ChildMap = std::map<std::string, AssetCatalogTreeItem> |
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.
| using blender::asset_system::AssetCatalogTreeItem::ItemIterFn = FunctionRef<void(const AssetCatalogTreeItem &)> |
Definition at line 33 of file AS_asset_catalog_tree.hh.
| 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.
| 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().
| int blender::asset_system::AssetCatalogTreeItem::count_parents | ( | ) | const |
Definition at line 49 of file asset_catalog_tree.cc.
Referenced by blender::asset_system::tests::compare_item_with_path().
| void blender::asset_system::AssetCatalogTreeItem::foreach_child | ( | ItemIterFn | callback | ) | const |
Iterate over children calling callback for each of them, but do not recurse into their children.
Definition at line 72 of file asset_catalog_tree.cc.
References callback.
Referenced by blender::ed::asset::shelf::AssetCatalogSelectorTree::build_catalog_items_recursive(), blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive(), blender::ed::geometry::catalog_assets_draw(), blender::ed::object::catalog_assets_draw(), blender::asset_system::tests::AssetCatalogTreeTestFunctions::expect_tree_item_child_items(), and blender::ed::space_node::node_add_catalog_assets_draw().
| CatalogID blender::asset_system::AssetCatalogTreeItem::get_catalog_id | ( | ) | const |
Definition at line 21 of file asset_catalog_tree.cc.
Referenced by 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::AssetCatalogDragController::create_drag_data(), blender::ed::asset_browser::AssetCatalogTreeViewItem::on_activate(), blender::ed::asset_browser::AssetCatalogDragController::on_drag_start(), blender::ed::asset_browser::AssetCatalogDropTarget::on_drop(), and blender::ed::asset_browser::AssetCatalogTreeViewItem::rename().
| StringRefNull blender::asset_system::AssetCatalogTreeItem::get_name | ( | ) | const |
Definition at line 26 of file asset_catalog_tree.cc.
Referenced by blender::ed::asset::shelf::AssetCatalogTreeView::build_catalog_items_recursive(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), blender::asset_system::tests::compare_item_with_path(), blender::ed::asset::draw_menu_for_catalog(), and blender::ed::object::root_catalogs_draw().
| StringRefNull blender::asset_system::AssetCatalogTreeItem::get_simple_name | ( | ) | const |
Definition at line 31 of file asset_catalog_tree.cc.
Referenced by blender::ed::asset_browser::AssetCatalogDropTarget::on_drop().
| bool blender::asset_system::AssetCatalogTreeItem::has_children | ( | ) | const |
Definition at line 58 of file asset_catalog_tree.cc.
Referenced by blender::ed::object::catalog_assets_draw(), and blender::ed::space_node::node_add_catalog_assets_draw().
| bool blender::asset_system::AssetCatalogTreeItem::has_unsaved_changes | ( | ) | const |
Definition at line 35 of file asset_catalog_tree.cc.
Referenced by blender::ed::asset_browser::AssetCatalogTreeViewItem::build_row().
|
friend |
Definition at line 50 of file AS_asset_catalog_tree.hh.