diff options
author | Julian Eisel <julian@blender.org> | 2022-01-26 20:45:00 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-01-26 21:15:57 +0300 |
commit | 9dc0379dc0023fe45f185dc594dbd4a2fd9fedd3 (patch) | |
tree | edd5e742043a00acf76d56af60aed902aba9d5d0 /source/blender/editors/space_outliner/tree | |
parent | f6296e502adb4265b6377daa69cbbd50dcbf6fbd (diff) |
Cleanup: Improve function name, introduced in own recent commit
I prefer it this way around now, especially since I'm adding a
`getPointerRNA()` too. Good to keep it match the actual struct names.
Diffstat (limited to 'source/blender/editors/space_outliner/tree')
-rw-r--r-- | source/blender/editors/space_outliner/tree/tree_element_rna.cc | 12 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/tree/tree_element_rna.hh | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_element_rna.cc b/source/blender/editors/space_outliner/tree/tree_element_rna.cc index b39ff74b03a..d33cd7005d7 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_rna.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_rna.cc @@ -73,7 +73,7 @@ bool TreeElementRNACommon::expandPoll(const SpaceOutliner &) const return isRNAValid(); } -PropertyRNA *TreeElementRNACommon::getRNAProperty() const +PropertyRNA *TreeElementRNACommon::getPropertyRNA() const { return nullptr; } @@ -118,7 +118,7 @@ void TreeElementRNAStruct::expand(SpaceOutliner &space_outliner) const legacy_te_.parent) : nullptr; /* auto open these cases */ - if (!parent_prop_te || (RNA_property_type(parent_prop_te->getRNAProperty()) == PROP_POINTER)) { + if (!parent_prop_te || (RNA_property_type(parent_prop_te->getPropertyRNA()) == PROP_POINTER)) { if (!tselem.used) { tselem.flag &= ~TSE_CLOSED; } @@ -231,7 +231,7 @@ void TreeElementRNAProperty::expand(SpaceOutliner &space_outliner) const } } -PropertyRNA *TreeElementRNAProperty::getRNAProperty() const +PropertyRNA *TreeElementRNAProperty::getPropertyRNA() const { return rna_prop_; } @@ -249,7 +249,7 @@ TreeElementRNAArrayElement::TreeElementRNAArrayElement(TreeElement &legacy_te, BLI_assert(legacy_te.parent && (legacy_te.parent->store_elem->type == TSE_RNA_PROPERTY)); legacy_te_.index = index; - char c = RNA_property_array_item_char(TreeElementRNAArrayElement::getRNAProperty(), index); + char c = RNA_property_array_item_char(TreeElementRNAArrayElement::getPropertyRNA(), index); legacy_te_.name = reinterpret_cast<char *>( MEM_callocN(sizeof(char[20]), "OutlinerRNAArrayName")); @@ -262,12 +262,12 @@ TreeElementRNAArrayElement::TreeElementRNAArrayElement(TreeElement &legacy_te, legacy_te_.flag |= TE_FREE_NAME; } -PropertyRNA *TreeElementRNAArrayElement::getRNAProperty() const +PropertyRNA *TreeElementRNAArrayElement::getPropertyRNA() const { /* Forward query to the parent (which is expected to be a #TreeElementRNAProperty). */ const TreeElementRNAProperty *parent_prop_te = tree_element_cast<TreeElementRNAProperty>( legacy_te_.parent); - return parent_prop_te ? parent_prop_te->getRNAProperty() : nullptr; + return parent_prop_te ? parent_prop_te->getPropertyRNA() : nullptr; } } // namespace blender::ed::outliner diff --git a/source/blender/editors/space_outliner/tree/tree_element_rna.hh b/source/blender/editors/space_outliner/tree/tree_element_rna.hh index bce527e724b..8f53a8b7f31 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_rna.hh +++ b/source/blender/editors/space_outliner/tree/tree_element_rna.hh @@ -47,7 +47,7 @@ class TreeElementRNACommon : public AbstractTreeElement { * If this element represents a property or is part of a property (array element), this returns * the property. Otherwise nullptr. */ - virtual PropertyRNA *getRNAProperty() const; + virtual PropertyRNA *getPropertyRNA() const; bool isRNAValid() const; }; @@ -70,7 +70,7 @@ class TreeElementRNAProperty : public TreeElementRNACommon { TreeElementRNAProperty(TreeElement &legacy_te, PointerRNA &rna_ptr, int index); void expand(SpaceOutliner &space_outliner) const override; - PropertyRNA *getRNAProperty() const override; + PropertyRNA *getPropertyRNA() const override; }; /* -------------------------------------------------------------------- */ @@ -79,7 +79,7 @@ class TreeElementRNAArrayElement : public TreeElementRNACommon { public: TreeElementRNAArrayElement(TreeElement &legacy_te, PointerRNA &rna_ptr, int index); - PropertyRNA *getRNAProperty() const override; + PropertyRNA *getPropertyRNA() const override; }; } // namespace blender::ed::outliner |