Blender  V3.3
Namespaces | Classes | Typedefs | Enumerations | Functions
blender::ed::outliner Namespace Reference

Namespaces

 tree_iterator
 

Classes

struct  TreeSourceData
 The data to build the tree from. More...
 
class  AbstractTreeDisplay
 Base Class For Tree-Displays. More...
 
class  TreeDisplayViewLayer
 Tree-Display for the View Layer display mode. More...
 
class  TreeDisplayLibraries
 Tree-Display for the Libraries display mode. More...
 
class  TreeDisplayOverrideLibraryProperties
 Tree-Display for the Library Overrides display mode, Properties view mode. More...
 
class  TreeDisplayOverrideLibraryHierarchies
 Tree-Display for the Library Overrides display mode, Hierarchies view mode. More...
 
class  TreeDisplaySequencer
 Tree-Display for the Video Sequencer display mode. More...
 
class  TreeDisplayIDOrphans
 Tree-Display for the Orphaned Data display mode. More...
 
class  TreeDisplayScenes
 Tree-Display for the Scenes display mode. More...
 
class  TreeDisplayDataAPI
 Tree-Display for the Scenes display mode. More...
 
class  OverrideIDHierarchyBuilder
 
class  ObjectsChildrenBuilder
 
class  AbstractTreeElement
 
class  TreeElementAnimData
 
class  TreeElementCollectionBase
 
class  TreeElementDriverBase
 
class  TreeElementGPencilLayer
 
class  TreeElementID
 
class  TreeElementIDLibrary
 
class  TreeElementIDScene
 
class  TreeElementLabel
 
class  TreeElementNLA
 
class  TreeElementNLATrack
 
class  TreeElementNLAAction
 
class  OverrideRNAPathTreeBuilder
 
struct  TreeElementOverridesData
 
class  TreeElementOverridesBase
 
class  TreeElementOverridesProperty
 
class  TreeElementOverridesPropertyOperation
 
class  TreeElementRNACommon
 
class  TreeElementRNAStruct
 
class  TreeElementRNAProperty
 
class  TreeElementRNAArrayElement
 
class  TreeElementSceneObjectsBase
 
class  TreeElementSequence
 
class  TreeElementSequenceStrip
 
class  TreeElementSequenceStripDuplicate
 
class  TreeElementViewLayerBase
 

Typedefs

template<typename T >
using List = ListBaseWrapper< T >
 

Enumerations

enum  SequenceAddOp { SEQUENCE_DUPLICATE_NOOP = 0 , SEQUENCE_DUPLICATE_ADD , SEQUENCE_DUPLICATE_NONE }
 

Functions

template<typename TreeElementT >
TreeElementT * tree_element_cast (const TreeElement *te)
 
TreeElementoutliner_add_element (SpaceOutliner *space_outliner, ListBase *lb, void *idv, TreeElement *parent, short type, short index, const bool expand)
 
void tree_element_expand (const AbstractTreeElement &tree_element, SpaceOutliner &space_outliner)
 
Base Element

Represents an ID that has overridden properties. The expanding will invoke building of tree elements for the full RNA path of the property.

static void iterate_properties_to_display (ID &id, const bool show_system_overrides, FunctionRef< void(TreeElementOverridesData &data)> fn)
 
Helper to build a hierarchy from an RNA path.

Builds a nice hierarchy representing the nested structs of the override property's RNA path using UI names and icons. For example animation_visualization_mothion_path.frame_end becomes:

  • Animation Visualization

Paths are merged so that each RNA sub-path is only represented once in the tree. So there is some finicky path building going on to create a path -> tree-element map.

This is more complicated than you'd think it needs to be. Mostly because of RNA collection overrides:

  • A single override may add (and in future remove) multiple collection items. So all operations of the override have to be considered.
  • The order of collection items may matter (e.g. for modifiers), so if collection items are added/removed, we want to show all other collection items too, in the right order.
  • If the override is inside some collection item, the collection item has to be built, but the RNA path iterator doesn't
static BIFIconID get_property_icon (PointerRNA &ptr, PropertyRNA &prop)
 

Library override hierarchy building

enum  ForeachChildReturn { FOREACH_CONTINUE , FOREACH_BREAK }
 
static void foreach_natural_hierarchy_child (const MainIDRelations &id_relations, const ID &parent_id, FunctionRef< ForeachChildReturn(ID &)> fn)
 
static bool id_is_in_override_hierarchy (const Main &bmain, const ID &id, const ID &relationship_parent_id, const ID &override_root_id)
 

Typedef Documentation

◆ List

template<typename T >
using blender::ed::outliner::List = typedef ListBaseWrapper<T>

Definition at line 25 of file tree_display_libraries.cc.

Enumeration Type Documentation

◆ ForeachChildReturn

Enumerator
FOREACH_CONTINUE 
FOREACH_BREAK 

Definition at line 173 of file tree_display_override_library_hierarchies.cc.

◆ SequenceAddOp

Enumerator
SEQUENCE_DUPLICATE_NOOP 
SEQUENCE_DUPLICATE_ADD 
SEQUENCE_DUPLICATE_NONE 

Definition at line 180 of file tree_display.hh.

Function Documentation

◆ foreach_natural_hierarchy_child()

static void blender::ed::outliner::foreach_natural_hierarchy_child ( const MainIDRelations id_relations,
const ID parent_id,
FunctionRef< ForeachChildReturn(ID &)>  fn 
)
static

Iterate over the IDs parent_id uses. E.g. the child collections and contained objects of a parent collection. Also does special handling for object parenting, so that:

  • When iterating over a child object, fn is executed for the parent instead.
  • When iterating over a parent object, fn is additionally executed for all children. Given that the parent object isn't skipped, the caller has to ensure it's not added in the hierarchy twice. This allows us to build the hierarchy in the expected ("natural") order, where parent objects are actual parent elements in the hierarchy, even though in data, the relation goes the other way around (children point to or "use" the parent).

Only handles regular object parenting, not cases like the "Child of" constraint. Other Outliner display modes don't show this as parent in the hierarchy either.

Definition at line 258 of file tree_display_override_library_hierarchies.cc.

References BLI_ghash_lookup(), FOREACH_BREAK, MainIDRelationsEntry::from_ids, GS, Object::id, ID_OB, IDWALK_CB_LOOPBACK, ID::name, MainIDRelationsEntryItem::next, Object::parent, MainIDRelations::relations_from_pointers, and MainIDRelationsEntry::to_ids.

◆ get_property_icon()

static BIFIconID blender::ed::outliner::get_property_icon ( PointerRNA ptr,
PropertyRNA prop 
)
static

◆ id_is_in_override_hierarchy()

static bool blender::ed::outliner::id_is_in_override_hierarchy ( const Main bmain,
const ID id,
const ID relationship_parent_id,
const ID override_root_id 
)
static

◆ iterate_properties_to_display()

static void blender::ed::outliner::iterate_properties_to_display ( ID id,
const bool  show_system_overrides,
FunctionRef< void(TreeElementOverridesData &data)>  fn 
)
static

◆ outliner_add_element()

struct TreeElement * blender::ed::outliner::outliner_add_element ( SpaceOutliner space_outliner,
ListBase lb,
void idv,
struct TreeElement parent,
short  type,
short  index,
const bool  expand = true 
)

TODO: this function needs to be split up! It's getting a bit too large...

Note
"ID" is not always a real ID.
If child items are only added to the tree if the item is open, the TSE_ type must be added to #outliner_element_needs_rebuild_on_open_change().
Parameters
expandIf 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 795 of file outliner_tree.cc.

References TreeElement::abstract_element, BLI_addtail(), BLI_assert, BLI_assert_msg, check_persistent(), blender::ed::outliner::AbstractTreeElement::createFromType(), ELEM, TreeStoreElem::flag, GS, id, TreeElement::idcode, TreeElement::index, TreeElement::name, ID::name, outliner_add_id_contents(), TreeElement::parent, SEARCHING_OUTLINER, tree_element_expand(), TREESTORE, TREESTORE_ID_TYPE, TSE_ANIM_DATA, TSE_CHILDSEARCH, TSE_DRIVER_BASE, TSE_GENERIC_LABEL, TSE_GP_LAYER, TSE_ID_BASE, TSE_IS_REAL_ID, TSE_LAYER_COLLECTION, TSE_LIBRARY_OVERRIDE, TSE_LIBRARY_OVERRIDE_BASE, TSE_LIBRARY_OVERRIDE_OPERATION, TSE_NLA, TSE_NLA_ACTION, TSE_NLA_TRACK, 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, TSE_VIEW_COLLECTION_BASE, and type.

Referenced by blender::ed::outliner::OverrideRNAPathTreeBuilder::build_path(), blender::ed::outliner::TreeDisplayViewLayer::buildTree(), blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::buildTree(), blender::ed::outliner::TreeDisplaySequencer::buildTree(), blender::ed::outliner::TreeDisplayIDOrphans::buildTree(), blender::ed::outliner::TreeDisplayScenes::buildTree(), blender::ed::outliner::TreeDisplayDataAPI::buildTree(), 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(), outliner_add_bone(), outliner_add_collection_objects(), outliner_add_collection_recursive(), outliner_add_id_contents(), and outliner_add_object_contents().

◆ tree_element_cast()

template<typename TreeElementT >
TreeElementT* blender::ed::outliner::tree_element_cast ( const TreeElement te)

Helper to safely "cast" a TreeElement to its new C++ #AbstractTreeElement, if possible.

Returns
nullptr if the tree-element doesn't match the requested type TreeElementT or the element doesn't hold a C++ #AbstractTreeElement pendant yet.

Definition at line 700 of file outliner_intern.hh.

References TreeElement::abstract_element.

◆ tree_element_expand()

void blender::ed::outliner::tree_element_expand ( const AbstractTreeElement tree_element,
SpaceOutliner space_outliner 
)

Definition at line 126 of file tree_element.cc.

Referenced by outliner_add_element().