Blender V5.3
blender::ed::outliner::TreeElementRNACommon Class Reference

#include <tree_element_rna.hh>

Inherits blender::ed::outliner::AbstractTreeElement.

Inherited by blender::ed::outliner::TreeElementRNAArrayElement, blender::ed::outliner::TreeElementRNAProperty, and blender::ed::outliner::TreeElementRNAStruct.

Public Member Functions

 TreeElementRNACommon (TreeElement &legacy_te, PointerRNA &rna_ptr)
bool expand_poll (const SpaceOutliner &) const override
const PointerRNA & get_pointer_rna () const
virtual PropertyRNA * get_property_rna () const
bool is_rna_valid () const
Public Member Functions inherited from blender::ed::outliner::AbstractTreeElement
virtual ~AbstractTreeElement ()=default
TreeElement & get_legacy_element ()
virtual StringRefNull get_warning () const
virtual std::optional< BIFIconID > get_icon () const
void print_path ()

Static Public Member Functions

static ID * owner_id (PointerRNA &rna_ptr)
static ID * owner_id (PointerRNA &rna_ptr, int index)
static const void * persistent_ptr (PointerRNA &rna_ptr)
static const void * persistent_ptr (PointerRNA &rna_ptr, int index)
Static Public Member Functions inherited from blender::ed::outliner::AbstractTreeElement
static void uncollapse_by_default (TreeElement *legacy_te)

Protected Attributes

PointerRNA rna_ptr_
Protected Attributes inherited from blender::ed::outliner::AbstractTreeElement
TreeElement & legacy_te_
AbstractTreeDisplay * display_

Static Protected Attributes

static constexpr int max_index = std::numeric_limits<short>::max()

Additional Inherited Members

Protected Member Functions inherited from blender::ed::outliner::AbstractTreeElement
 AbstractTreeElement (TreeElement &legacy_te)
virtual void expand (SpaceOutliner &) const
template<typename ElementType, typename... Args>
TreeElement * add_element (const TreeElementAddParams &params, Args &&...args) const
TreeElement * add_id_element (const TreeElementAddParams &params, ID *id) const

Detailed Description

Base class for common behavior of RNA tree elements.

Definition at line 28 of file tree_element_rna.hh.

Constructor & Destructor Documentation

◆ TreeElementRNACommon()

Member Function Documentation

◆ expand_poll()

bool blender::ed::outliner::TreeElementRNACommon::expand_poll ( const SpaceOutliner & ) const
overridevirtual

Check if the type is expandable in current context.

Reimplemented from blender::ed::outliner::AbstractTreeElement.

Definition at line 50 of file tree_element_rna.cc.

References is_rna_valid().

◆ get_pointer_rna()

◆ get_property_rna()

PropertyRNA * blender::ed::outliner::TreeElementRNACommon::get_property_rna ( ) const
virtual

If this element represents a property or is part of a property (array element), this returns the property. Otherwise nullptr.

Reimplemented in blender::ed::outliner::TreeElementRNAArrayElement, and blender::ed::outliner::TreeElementRNAProperty.

Definition at line 81 of file tree_element_rna.cc.

Referenced by blender::ed::outliner::do_outliner_drivers_editop(), and blender::ed::outliner::do_outliner_keyingset_editop().

◆ is_rna_valid()

bool blender::ed::outliner::TreeElementRNACommon::is_rna_valid ( ) const

◆ owner_id() [1/2]

ID * blender::ed::outliner::TreeElementRNACommon::owner_id ( PointerRNA & rna_ptr)
static

RNA elements are identified by their owning ID where there is one, and by the data they point at otherwise. Overloaded for the sub-types that additionally take an array index. See #AbstractTreeDisplay::add_element().

Definition at line 55 of file tree_element_rna.cc.

References blender::PointerRNA::owner_id.

Referenced by owner_id().

◆ owner_id() [2/2]

ID * blender::ed::outliner::TreeElementRNACommon::owner_id ( PointerRNA & rna_ptr,
int index )
static

Definition at line 60 of file tree_element_rna.cc.

References owner_id().

◆ persistent_ptr() [1/2]

const void * blender::ed::outliner::TreeElementRNACommon::persistent_ptr ( PointerRNA & rna_ptr)
static

Definition at line 65 of file tree_element_rna.cc.

References blender::PointerRNA::data.

Referenced by persistent_ptr().

◆ persistent_ptr() [2/2]

const void * blender::ed::outliner::TreeElementRNACommon::persistent_ptr ( PointerRNA & rna_ptr,
int index )
static

Definition at line 71 of file tree_element_rna.cc.

References persistent_ptr().

Member Data Documentation

◆ max_index

int blender::ed::outliner::TreeElementRNACommon::max_index = std::numeric_limits<short>::max()
staticconstexprprotected

◆ rna_ptr_


The documentation for this class was generated from the following files: