diff options
author | Fabian Schempp <fabianschempp@googlemail.com> | 2021-04-13 23:11:58 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2021-04-13 23:11:58 +0300 |
commit | 170293475c36b4c462bdad372a03533d2b948bf1 (patch) | |
tree | 117071b6a074568a9970b45463c7bdea60fabbf2 /source/blender/editors/space_node | |
parent | 86915d04ee3801a916d3b12cac5cc523c6c9149a (diff) |
Nodes: Tooltip for Group Input properties
With this patch, users can define custom tooltips for the exposed
properties of their Geometry Nodes Groups.
Currently this custom tooltips are only used in the modifier panel,
but its a long term goal to use it in the node editor.
Reviewer: Hans Goudey
Differential Revision: https://developer.blender.org/D10884
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_buttons.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index eb89658857b..336b0c46a81 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -157,6 +157,11 @@ static void draw_socket_list(const bContext *C, RNA_pointer_create((ID *)ntree, &RNA_NodeSocketInterface, socket, &socket_ptr); uiItemR(layout, &socket_ptr, "name", 0, NULL, ICON_NONE); + /* Display descriptions only for Geometry Nodes, since it's only used in the modifier panel. */ + if (ntree->type == NTREE_GEOMETRY) { + uiItemR(layout, &socket_ptr, "description", 0, NULL, ICON_NONE); + } + if (socket->typeinfo->interface_draw) { socket->typeinfo->interface_draw((bContext *)C, layout, &socket_ptr); } |