From 170293475c36b4c462bdad372a03533d2b948bf1 Mon Sep 17 00:00:00 2001 From: Fabian Schempp Date: Tue, 13 Apr 2021 22:11:58 +0200 Subject: 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 --- source/blender/editors/space_node/node_buttons.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/space_node/node_buttons.c') 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); } -- cgit v1.2.3