Blender V5.3
blender::ed::outliner::TreeElementOverridesPropertyOperation Class Referencefinal

#include <tree_element_overrides.hh>

Inherits blender::ed::outliner::TreeElementOverridesProperty.

Static Public Member Functions

Overridden Property

Represents an RNA property that was overridden.

static ID * owner_id (TreeElementOverridesData &override_data)
static ID * owner_id (TreeElementOverridesData &override_data)
Static Public Member Functions inherited from blender::ed::outliner::AbstractTreeElement
static void uncollapse_by_default (TreeElement *legacy_te)

Static Public Attributes

static constexpr eTreeStoreElemType element_type = TSE_LIBRARY_OVERRIDE_OPERATION
Static Public Attributes inherited from blender::ed::outliner::TreeElementOverridesProperty
static constexpr eTreeStoreElemType element_type = TSE_LIBRARY_OVERRIDE

Overridden Property Operation

See TreeElementOverridesPropertyOperation.

 TreeElementOverridesPropertyOperation (TreeElement &legacy_te, TreeElementOverridesData &override_data)
StringRefNull get_override_operation_label () const
StringRefNull get_override_operation_tooltip () const
std::optional< BIFIconID > get_icon () const override
short get_operation_type () const
IDOverrideLibraryPropertyOperation * get_override_operation_from_id (ID &id, IDOverrideLibraryProperty &override_property) const

Additional Inherited Members

 TreeElementOverridesProperty (TreeElement &legacy_te, TreeElementOverridesData &override_data)
StringRefNull get_warning () const override
IDOverrideLibraryProperty * get_override_property_from_id (ID &id) const
Public Member Functions inherited from blender::ed::outliner::AbstractTreeElement
virtual ~AbstractTreeElement ()=default
virtual bool expand_poll (const SpaceOutliner &) const
TreeElement & get_legacy_element ()
void print_path ()
Public Attributes inherited from blender::ed::outliner::TreeElementOverridesProperty
PointerRNA override_rna_ptr
PropertyRNA & override_rna_prop
StringRefNull rna_path
bool is_rna_path_valid
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
Protected Attributes inherited from blender::ed::outliner::AbstractTreeElement
TreeElement & legacy_te_
AbstractTreeDisplay * display_

Detailed Description

Represent a single operation within an overridden property. While usually a single override property represents a single operation (changing the value), a single overridden collection property may have multiple operations, e.g. to insert or remove collection items.

Inherits from the override property class since it should look/behave mostly the same.

Definition at line 100 of file tree_element_overrides.hh.

Constructor & Destructor Documentation

◆ TreeElementOverridesPropertyOperation()

Member Function Documentation

◆ get_icon()

std::optional< BIFIconID > blender::ed::outliner::TreeElementOverridesPropertyOperation::get_icon ( ) const
overridevirtual

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 from blender::ed::outliner::TreeElementOverridesProperty.

Definition at line 285 of file tree_element_overrides.cc.

References blender::RNA_struct_ui_icon().

◆ get_operation_type()

short blender::ed::outliner::TreeElementOverridesPropertyOperation::get_operation_type ( ) const

Return liboverride operation type (eID_OverrideLib_Op).

Definition at line 294 of file tree_element_overrides.cc.

◆ get_override_operation_from_id()

IDOverrideLibraryPropertyOperation * blender::ed::outliner::TreeElementOverridesPropertyOperation::get_override_operation_from_id ( ID & id,
IDOverrideLibraryProperty & override_property ) const

Return the liboverride operation matching this tree element, for the given ID and library override property.

Definition at line 299 of file tree_element_overrides.cc.

References blender::BLI_assert(), ID_IS_OVERRIDE_LIBRARY_REAL, blender::IDOverrideLibraryProperty::operations, and UNUSED_VARS_NDEBUG.

◆ get_override_operation_label()

StringRefNull blender::ed::outliner::TreeElementOverridesPropertyOperation::get_override_operation_label ( ) const

Return a short string to display in the right column of the properties mode, indicating what the override operation did (e.g. added or removed a collection item).

Note
: When returning an empty string, the outliner drawing code assumes that it can draw an editing widget based on the affected RNA property instead.

Definition at line 249 of file tree_element_overrides.cc.

References blender::LIBOVERRIDE_OP_ADD, blender::LIBOVERRIDE_OP_CUSTOM, blender::LIBOVERRIDE_OP_INSERT_AFTER, blender::LIBOVERRIDE_OP_INSERT_BEFORE, blender::LIBOVERRIDE_OP_MULTIPLY, blender::LIBOVERRIDE_OP_NOOP, blender::LIBOVERRIDE_OP_REPLACE, blender::LIBOVERRIDE_OP_SUBTRACT, and RPT_.

◆ get_override_operation_tooltip()

StringRefNull blender::ed::outliner::TreeElementOverridesPropertyOperation::get_override_operation_tooltip ( ) const

Return a longer string to display as tooltip in the right column of the properties mode.

Definition at line 277 of file tree_element_overrides.cc.

◆ owner_id()

ID * blender::ed::outliner::TreeElementOverridesPropertyOperation::owner_id ( TreeElementOverridesData & override_data)
static

The ID identifying this element in the tree-store, see #AbstractTreeDisplay::add_element().

Definition at line 175 of file tree_element_overrides.cc.

References blender::ed::outliner::TreeElementOverridesData::id.

Member Data Documentation

◆ element_type

eTreeStoreElemType blender::ed::outliner::TreeElementOverridesPropertyOperation::element_type = TSE_LIBRARY_OVERRIDE_OPERATION
staticconstexpr

Definition at line 106 of file tree_element_overrides.hh.


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