|
Blender V4.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 ListBase | build_tree (const TreeSourceData &source_data)=0 |
| virtual bool | supports_mode_column () const |
| virtual bool | is_lazy_built () const |
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_element (ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) |
| static TreeElement * | add_element (SpaceOutliner *space_outliner, ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) |
Base Class For Tree-Displays.
Abstract base class defining the interface for tree-display variants.
Definition at line 64 of file tree_display.hh.
|
inline |
Definition at line 66 of file tree_display.hh.
|
virtualdefault |
| TreeElement * blender::ed::outliner::AbstractTreeDisplay::add_element | ( | ListBase * | lb, |
| ID * | owner_id, | ||
| void * | create_data, | ||
| TreeElement * | parent, | ||
| short | type, | ||
| short | index, | ||
| const bool | expand = true ) |
TSE_ type must be added to #outliner_element_needs_rebuild_on_open_change().| owner_id | The ID owning the represented data (or the ID itself if the element represents an ID directly). This is crucial to recognize tree elements over rebuilds, so that state like opened and selected is preserved. If this is not null, the create_data pointer will be used instead, refer to its description. |
| create_data | Data passed to the constructor of the corresponding #AbstractTreeElement sub-type. If owner_id is not set, this pointer will be stored in an attempt to identify the element over rebuilds, so that state like opened and selected is preserved. Of course that won't work for volatile data (like stack variables). |
| expand | If true, the element may add its own sub-tree. E.g. objects will list their animation data, object data, constraints, modifiers, ... This often adds visual noise, and can be expensive to add in big scenes. So prefer setting this to false. |
Definition at line 240 of file outliner_tree.cc.
References blender::ed::outliner::TreeElement::abstract_element, BLI_addtail(), BLI_assert, BLI_assert_msg, blender::ed::outliner::check_persistent(), blender::ed::outliner::AbstractTreeElement::create_from_type(), ELEM, TreeStoreElem::flag, GS, blender::ed::outliner::TreeElement::idcode, blender::ed::outliner::TreeElement::index, blender::ed::outliner::TreeElement::name, ID::name, blender::ed::outliner::TreeElement::parent, SEARCHING_OUTLINER, space_outliner_, blender::ed::outliner::tree_element_expand(), TREESTORE, TREESTORE_ID_TYPE, TSE_ANIM_DATA, TSE_BONE, TSE_BONE_COLLECTION, TSE_BONE_COLLECTION_BASE, TSE_CHILDSEARCH, TSE_CONSTRAINT, TSE_CONSTRAINT_BASE, TSE_DEFGROUP, TSE_DEFGROUP_BASE, TSE_DRIVER_BASE, TSE_EBONE, TSE_GENERIC_LABEL, TSE_GP_LAYER, TSE_GPENCIL_EFFECT, TSE_GPENCIL_EFFECT_BASE, TSE_GREASE_PENCIL_NODE, TSE_ID_BASE, TSE_IS_REAL_ID, TSE_LAYER_COLLECTION, TSE_LIBRARY_OVERRIDE, TSE_LIBRARY_OVERRIDE_BASE, TSE_LIBRARY_OVERRIDE_OPERATION, TSE_LINKED_NODE_TREE, TSE_LINKED_OB, TSE_LINKED_PSYS, TSE_MODIFIER, TSE_MODIFIER_BASE, TSE_NLA, TSE_NLA_TRACK, TSE_POSE_BASE, TSE_POSE_CHANNEL, TSE_R_LAYER, TSE_R_LAYER_BASE, TSE_RNA_ARRAY_ELEM, TSE_RNA_PROPERTY, TSE_RNA_STRUCT, TSE_SCENE_COLLECTION_BASE, TSE_SEQ_STRIP, TSE_SEQUENCE, TSE_SEQUENCE_DUP, TSE_SOME_ID, and TSE_VIEW_COLLECTION_BASE.
|
static |
Static version of the function below, which can be called by helper functions/classes that have access to the SpaceOutliner instance but not the tree-display directly. Should be avoided and instead use the tree-display.
Definition at line 222 of file outliner_tree.cc.
References BLI_assert_unreachable, and SpaceOutliner::runtime.
Referenced by blender::ed::outliner::AbstractTreeElement::add_element(), blender::ed::outliner::OverrideRNAPathTreeBuilder::build_path(), blender::ed::outliner::TreeDisplayDataAPI::build_tree(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::build_tree(), blender::ed::outliner::TreeDisplayScenes::build_tree(), blender::ed::outliner::TreeDisplaySequencer::build_tree(), blender::ed::outliner::TreeDisplayViewLayer::build_tree(), blender::ed::outliner::outliner_add_bone(), 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.
|
static |
Definition at line 20 of file tree_display.cc.
References BLI_assert_unreachable, SpaceOutliner::lib_override_view_mode, SO_DATA_API, SO_ID_ORPHANS, SO_LIB_OVERRIDE_VIEW_HIERARCHIES, SO_LIB_OVERRIDE_VIEW_PROPERTIES, SO_LIBRARIES, SO_OVERRIDES_LIBRARY, SO_SCENES, SO_SEQUENCE, and SO_VIEW_LAYER.
Referenced by blender::ed::outliner::outliner_build_tree().
|
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 55 of file tree_display.cc.
|
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 50 of file tree_display.cc.
Referenced by 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 137 of file tree_display.hh.
Referenced by add_element(), blender::ed::outliner::TreeDisplayDataAPI::build_tree(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::build_tree(), blender::ed::outliner::TreeDisplayScenes::build_tree(), and blender::ed::outliner::TreeDisplayViewLayer::build_tree().