From 7f07124d30f1b8d1eb041d0e3672eb74ba07fcd5 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 14 Jul 2025 16:29:19 +0200 Subject: [PATCH] Fix #141847: Input node properties missing in sidebar This was caused by 87c011f8bb0ac. The drawing code for the input nodes was moved into a new `custom_draw_fn` callback on the socket declaration. This was not taken into account when drawing the sidebar yet, which is an oversight and was not an intentional change. This fix applies to all the nodes that use the new custom draw function. Pull Request: https://projects.blender.org/blender/blender/pulls/141872 --- .../templates/interface_template_node_inputs.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/templates/interface_template_node_inputs.cc b/source/blender/editors/interface/templates/interface_template_node_inputs.cc index 5e450b4980e..6d7f052e2d9 100644 --- a/source/blender/editors/interface/templates/interface_template_node_inputs.cc +++ b/source/blender/editors/interface/templates/interface_template_node_inputs.cc @@ -159,8 +159,20 @@ void uiTemplateNodeInputs(uiLayout *layout, bContext *C, PointerRNA *ptr) blender::ui::nodes::draw_node_inputs_recursive(C, layout, node, ptr, *panel_decl); } else if (const auto *socket_decl = dynamic_cast(item_decl)) { - if (socket_decl->in_out == SOCK_IN) { - blender::ui::nodes::draw_node_input(C, layout, ptr, node.socket_by_decl(*socket_decl)); + bNodeSocket &socket = node.socket_by_decl(*socket_decl); + if (socket_decl->custom_draw_fn) { + CustomSocketDrawParams params{ + *C, + *layout, + tree, + node, + socket, + *ptr, + RNA_pointer_create_discrete(ptr->owner_id, &RNA_NodeSocket, &socket)}; + (*socket_decl->custom_draw_fn)(params); + } + else if (socket_decl->in_out == SOCK_IN) { + blender::ui::nodes::draw_node_input(C, layout, ptr, socket); } } else if (const auto *layout_decl = dynamic_cast(item_decl)) {