|
Blender V5.3
|
Base Class For Tree-Displays. More...
#include <tree_display.hh>
Inherited by blender::ed::outliner::TreeDisplayDataAPI, blender::ed::outliner::TreeDisplayIDOrphans, blender::ed::outliner::TreeDisplayLibraries, blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies, blender::ed::outliner::TreeDisplayOverrideLibraryProperties, blender::ed::outliner::TreeDisplayScenes, blender::ed::outliner::TreeDisplaySequencer, and blender::ed::outliner::TreeDisplayViewLayer.
Public Member Functions | |
| AbstractTreeDisplay (SpaceOutliner &space_outliner) | |
| virtual | ~AbstractTreeDisplay ()=default |
| virtual ListBaseT< TreeElement > | build_tree (const TreeSourceData &source_data)=0 |
| virtual bool | supports_mode_column () const |
| virtual bool | is_lazy_built () const |
| template<typename ElementType, typename... Args> | |
| TreeElement * | add_element (const TreeElementAddParams ¶ms, Args &&...args) |
Static Public Member Functions | |
| static std::unique_ptr< AbstractTreeDisplay > | create_from_display_mode (int mode, SpaceOutliner &space_outliner) |
Protected Attributes | |
| SpaceOutliner & | space_outliner_ |
Tree Management | |
| TreeElement * | add_id_element (const TreeElementAddParams ¶ms, ID *id) |
| TreeElement * | add_element_impl (const TreeElementAddParams ¶ms, short type, ID *owner_id, const void *persistent_ptr, bool allow_null_identity, FunctionRef< std::unique_ptr< AbstractTreeElement >(TreeElement &)> construct_fn) |
Base Class For Tree-Displays.
Abstract base class defining the interface for tree-display variants.
Definition at line 167 of file tree_display.hh.
|
inline |
Definition at line 169 of file tree_display.hh.
References space_outliner_.
Referenced by blender::ed::outliner::TreeDisplayDataAPI::TreeDisplayDataAPI(), blender::ed::outliner::TreeDisplayIDOrphans::TreeDisplayIDOrphans(), blender::ed::outliner::TreeDisplayLibraries::TreeDisplayLibraries(), blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::TreeDisplayOverrideLibraryHierarchies(), blender::ed::outliner::TreeDisplayOverrideLibraryProperties::TreeDisplayOverrideLibraryProperties(), blender::ed::outliner::TreeDisplayScenes::TreeDisplayScenes(), blender::ed::outliner::TreeDisplaySequencer::TreeDisplaySequencer(), and blender::ed::outliner::TreeDisplayViewLayer::TreeDisplayViewLayer().
|
virtualdefault |
References create_from_display_mode().
| TreeElement * blender::ed::outliner::AbstractTreeDisplay::add_element | ( | const TreeElementAddParams & | params, |
| Args &&... | args ) |
Add a tree element of ElementType, forwarding args to its constructor. The remaining information the tree needs is queried from ElementType itself:
So a call only mentions the element type and its actual data:
Definition at line 248 of file tree_display.hh.
References add_element_impl(), BLI_assert_msg, blender::ed::outliner::detail::element_owner_id(), blender::ed::outliner::detail::element_persistent_ptr(), and blender::ed::outliner::TreeElementAddParams::owner_id.
Referenced by blender::ed::outliner::AbstractTreeElement::add_element(), build_tree(), blender::ed::outliner::TreeDisplayDataAPI::build_tree(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::build_tree(), blender::ed::outliner::TreeDisplaySequencer::build_tree(), blender::ed::outliner::TreeDisplayViewLayer::build_tree(), and blender::ed::outliner::outliner_add_bone().
|
protected |
The non-template part of add_element(), so the tree building logic stays in one place and isn't instantiated per element type. add_id_element() shares it.
Definition at line 214 of file outliner_tree.cc.
References blender::ed::outliner::TreeElement::abstract_element, blender::BLI_addtail(), blender::BLI_assert(), BLI_assert_msg, blender::ed::outliner::check_persistent(), blender::ed::outliner::TreeElementAddParams::expand, blender::ed::outliner::TreeElement::index, blender::ed::outliner::TreeElementAddParams::index, blender::ed::outliner::TreeElementAddParams::lb, blender::ed::outliner::TreeElement::name, blender::ed::outliner::TreeElement::parent, blender::ed::outliner::TreeElementAddParams::parent, SEARCHING_OUTLINER, space_outliner_, blender::ed::outliner::TreeElement::subtree, blender::ed::outliner::tree_element_expand(), TREESTORE, and blender::TSE_CHILDSEARCH.
Referenced by add_element(), add_id_element(), and build_tree().
| TreeElement * blender::ed::outliner::AbstractTreeDisplay::add_id_element | ( | const TreeElementAddParams & | params, |
| ID * | id ) |
Add an element representing the ID id itself (TSE_SOME_ID). Unlike the types handled by add_element() above, the concrete TreeElementID sub-type to construct is only known at run-time, from the ID's type.
Definition at line 192 of file outliner_tree.cc.
References blender::ed::outliner::TreeElement::abstract_element, add_element_impl(), blender::BLI_assert(), BLI_assert_msg, blender::ed::outliner::TreeElementID::create_from_id(), TREESTORE_ID_TYPE, and blender::TSE_SOME_ID.
Referenced by blender::ed::outliner::AbstractTreeElement::add_id_element(), build_tree(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::build_tree(), blender::ed::outliner::TreeDisplayScenes::build_tree(), blender::ed::outliner::outliner_add_collection_objects(), and blender::ed::outliner::outliner_add_collection_recursive().
|
pure virtual |
Build a tree for this display mode with the Blender context data given in source_data and the view settings in space_outliner.
Implemented in blender::ed::outliner::TreeDisplayDataAPI, blender::ed::outliner::TreeDisplayIDOrphans, blender::ed::outliner::TreeDisplayLibraries, blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies, blender::ed::outliner::TreeDisplayOverrideLibraryProperties, blender::ed::outliner::TreeDisplayScenes, blender::ed::outliner::TreeDisplaySequencer, and blender::ed::outliner::TreeDisplayViewLayer.
References add_element(), add_element_impl(), add_id_element(), is_lazy_built(), and supports_mode_column().
|
static |
Definition at line 19 of file tree_display.cc.
References BLI_assert_unreachable, blender::SpaceOutliner::lib_override_view_mode, blender::SO_DATA_API, blender::SO_ID_ORPHANS, blender::SO_LIB_OVERRIDE_VIEW_HIERARCHIES, blender::SO_LIB_OVERRIDE_VIEW_PROPERTIES, blender::SO_LIBRARIES, blender::SO_OVERRIDES_LIBRARY, blender::SO_SCENES, blender::SO_SEQUENCE, and blender::SO_VIEW_LAYER.
Referenced by blender::ed::outliner::outliner_build_tree(), and ~AbstractTreeDisplay().
|
virtual |
Some trees may want to skip building children of collapsed parents. This should be done if the tree type may become very complex, which could cause noticeable slowdowns. Problem: This doesn't address performance issues while searching, since all elements are constructed for that. Trees of this type have to be rebuilt for any change to the collapsed state of any element.
Reimplemented in blender::ed::outliner::TreeDisplayDataAPI, and blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies.
Definition at line 54 of file tree_display.cc.
Referenced by build_tree().
|
virtual |
Define if the display mode should be allowed to show a mode column on the left. This column adds an icon to indicate which objects are in the current mode (edit mode, pose mode, etc.) and allows adding other objects to the mode by clicking the icon.
Returns false by default.
Reimplemented in blender::ed::outliner::TreeDisplayScenes, and blender::ed::outliner::TreeDisplayViewLayer.
Definition at line 49 of file tree_display.cc.
Referenced by build_tree(), and blender::ed::outliner::outliner_shows_mode_column().
|
protected |
All derived classes will need a handle to this, so storing it in the base for convenience.
Definition at line 244 of file tree_display.hh.
Referenced by AbstractTreeDisplay(), add_element_impl(), blender::ed::outliner::TreeDisplayDataAPI::build_tree(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), blender::ed::outliner::TreeDisplayScenes::build_tree(), and blender::ed::outliner::TreeDisplayViewLayer::build_tree().