Fix #141847: Input node properties missing in sidebar

This was caused by 87c011f8bb. 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
This commit is contained in:
Jacques Lucke
2025-07-14 16:29:19 +02:00
parent 1f2f9aef51
commit 7f07124d30

View File

@@ -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<const SocketDeclaration *>(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<const LayoutDeclaration *>(item_decl)) {