Blender
V3.3
|
#include <tree_element.hh>
Public Member Functions | |
virtual | ~AbstractTreeElement ()=default |
virtual bool | expandPoll (const SpaceOutliner &) const |
virtual bool | isExpandValid () const |
TreeElement & | getLegacyElement () |
virtual StringRefNull | getWarning () const |
virtual std::optional< BIFIconID > | getIcon () const |
Static Public Member Functions | |
static std::unique_ptr< AbstractTreeElement > | createFromType (int type, TreeElement &legacy_te, void *idv) |
static void | uncollapse_by_default (TreeElement *legacy_te) |
Protected Member Functions | |
AbstractTreeElement (TreeElement &legacy_te) | |
virtual void | expand (SpaceOutliner &) const |
Protected Attributes | |
TreeElement & | legacy_te_ |
Friends | |
void | tree_element_expand (const AbstractTreeElement &tree_element, SpaceOutliner &space_outliner) |
Definition at line 24 of file tree_element.hh.
|
virtualdefault |
|
inlineprotected |
Definition at line 90 of file tree_element.hh.
|
static |
Definition at line 33 of file tree_element.cc.
References blender::ed::outliner::TreeElementID::createFromID(), TreeElement::index, TSE_ANIM_DATA, TSE_DRIVER_BASE, TSE_GENERIC_LABEL, TSE_GP_LAYER, TSE_LIBRARY_OVERRIDE, TSE_LIBRARY_OVERRIDE_BASE, TSE_LIBRARY_OVERRIDE_OPERATION, TSE_NLA, TSE_NLA_ACTION, TSE_NLA_TRACK, TSE_R_LAYER_BASE, TSE_RNA_ARRAY_ELEM, TSE_RNA_PROPERTY, TSE_RNA_STRUCT, TSE_SCENE_COLLECTION_BASE, TSE_SCENE_OBJECTS_BASE, TSE_SEQ_STRIP, TSE_SEQUENCE, TSE_SEQUENCE_DUP, TSE_SOME_ID, and type.
Referenced by blender::ed::outliner::outliner_add_element().
|
inlineprotectedvirtual |
Let the type add its own children.
Reimplemented in blender::ed::outliner::TreeElementRNAProperty, blender::ed::outliner::TreeElementRNAStruct, blender::ed::outliner::TreeElementNLATrack, blender::ed::outliner::TreeElementNLA, blender::ed::outliner::TreeElementDriverBase, blender::ed::outliner::TreeElementAnimData, blender::ed::outliner::TreeElementViewLayerBase, blender::ed::outliner::TreeElementSequence, blender::ed::outliner::TreeElementSceneObjectsBase, blender::ed::outliner::TreeElementOverridesBase, blender::ed::outliner::TreeElementIDScene, and blender::ed::outliner::TreeElementCollectionBase.
Definition at line 97 of file tree_element.hh.
|
inlinevirtual |
Check if the type is expandable in current context.
Reimplemented in blender::ed::outliner::TreeElementSequence, blender::ed::outliner::TreeElementRNACommon, and blender::ed::outliner::TreeElementID.
Definition at line 43 of file tree_element.hh.
|
virtual |
Define the icon to be displayed for this element. If this returns an icon, this will be displayed. Otherwise, tree_element_get_icon() may still determine an icon. By default no value is returned (#std::nullopt).
All elements should be ported to use this over tree_element_get_icon().
Reimplemented in blender::ed::outliner::TreeElementOverridesPropertyOperation, and blender::ed::outliner::TreeElementLabel.
Definition at line 114 of file tree_element.cc.
|
inline |
Definition at line 57 of file tree_element.hh.
References legacy_te_.
|
virtual |
By letting this return a warning message, the tree element will display a warning icon with the message in the tooltip.
Reimplemented in blender::ed::outliner::TreeElementOverridesProperty, blender::ed::outliner::TreeElementOverridesBase, and blender::ed::outliner::TreeElementIDLibrary.
Definition at line 109 of file tree_element.cc.
Referenced by outliner_draw_get_warning_tree_element(), and outliner_draw_get_warning_tree_element_subtree().
|
inlinevirtual |
Just while transitioning to the new tree-element design: Some types are only partially ported, and the expanding isn't done yet.
Reimplemented in blender::ed::outliner::TreeElementRNACommon, blender::ed::outliner::TreeElementIDScene, blender::ed::outliner::TreeElementIDLibrary, and blender::ed::outliner::TreeElementID.
Definition at line 52 of file tree_element.hh.
|
static |
Expand this tree element if it is displayed for the first time (as identified by its tree-store element).
Static for now to allow doing this from the legacy tree element.
Definition at line 119 of file tree_element.cc.
References TREESTORE, and TSE_CLOSED.
Referenced by blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::buildTree().
|
friend |
Definition at line 126 of file tree_element.cc.
|
protected |
Reference back to the owning legacy TreeElement. Most concrete types need access to this, so storing here. Eventually the type should be replaced by AbstractTreeElement and derived types.
Definition at line 31 of file tree_element.hh.
Referenced by blender::ed::outliner::TreeElementCollectionBase::expand(), blender::ed::outliner::TreeElementOverridesBase::expand(), blender::ed::outliner::TreeElementSceneObjectsBase::expand(), blender::ed::outliner::TreeElementSequence::expand(), blender::ed::outliner::TreeElementViewLayerBase::expand(), blender::ed::outliner::TreeElementAnimData::expand(), blender::ed::outliner::TreeElementDriverBase::expand(), blender::ed::outliner::TreeElementNLA::expand(), blender::ed::outliner::TreeElementNLATrack::expand(), blender::ed::outliner::TreeElementRNAStruct::expand(), blender::ed::outliner::TreeElementRNAProperty::expand(), blender::ed::outliner::TreeElementID::expand_animation_data(), blender::ed::outliner::TreeElementID::expandPoll(), getLegacyElement(), blender::ed::outliner::TreeElementRNAArrayElement::getPropertyRNA(), blender::ed::outliner::TreeElementID::TreeElementID(), blender::ed::outliner::TreeElementLabel::TreeElementLabel(), blender::ed::outliner::TreeElementRNAArrayElement::TreeElementRNAArrayElement(), blender::ed::outliner::TreeElementRNAProperty::TreeElementRNAProperty(), blender::ed::outliner::TreeElementRNAStruct::TreeElementRNAStruct(), blender::ed::outliner::TreeElementSequenceStrip::TreeElementSequenceStrip(), blender::ed::outliner::TreeElementSequenceStripDuplicate::TreeElementSequenceStripDuplicate(), and blender::ed::outliner::TreeElementViewLayerBase::TreeElementViewLayerBase().