Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-10-26 16:32:01 +0300
committerJacques Lucke <jacques@blender.org>2021-10-26 16:32:01 +0300
commitfd477e738dfd65f7bb0f06c1d91c3259ed26295d (patch)
treed3caadbd97f7b3be9e453047c0c1b3cd4590afad /source/blender/nodes/NOD_node_tree_ref.hh
parentb8b9023d8cd7e0be93f83533c37f50931a2a7c56 (diff)
Geometry Nodes: remove reference to anonymous attributes in tooltips
This changes socket inspection for fields according to T91881. Differential Revision: https://developer.blender.org/D13006
Diffstat (limited to 'source/blender/nodes/NOD_node_tree_ref.hh')
-rw-r--r--source/blender/nodes/NOD_node_tree_ref.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_node_tree_ref.hh b/source/blender/nodes/NOD_node_tree_ref.hh
index b6e372470c8..9f9dcc69376 100644
--- a/source/blender/nodes/NOD_node_tree_ref.hh
+++ b/source/blender/nodes/NOD_node_tree_ref.hh
@@ -200,6 +200,8 @@ class NodeRef : NonCopyable, NonMovable {
PointerRNA *rna() const;
StringRefNull idname() const;
StringRefNull name() const;
+ StringRefNull label() const;
+ StringRefNull label_or_name() const;
bNodeType *typeinfo() const;
const NodeDeclaration *declaration() const;
@@ -575,6 +577,20 @@ inline StringRefNull NodeRef::name() const
return bnode_->name;
}
+inline StringRefNull NodeRef::label() const
+{
+ return bnode_->label;
+}
+
+inline StringRefNull NodeRef::label_or_name() const
+{
+ const StringRefNull label = this->label();
+ if (!label.is_empty()) {
+ return label;
+ }
+ return this->name();
+}
+
inline bNodeType *NodeRef::typeinfo() const
{
return bnode_->typeinfo;