[Bf-blender-cvs] [b75946bcb6a] blender-v3.4-release: Fix T102620: Display dynamic socket label in uiTemplateNodeView
Leon Schittek
noreply at git.blender.org
Mon Nov 21 11:44:06 CET 2022
Commit: b75946bcb6ab14cd37f6be5dbbf0b14d74d297e8
Author: Leon Schittek
Date: Mon Nov 21 11:39:58 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rBb75946bcb6ab14cd37f6be5dbbf0b14d74d297e8
Fix T102620: Display dynamic socket label in uiTemplateNodeView
Some nodes, like Combine Color or the math nodes, label sockets
differently depending on the mode to be more descriptive.
`uiTemplateNodeView` now also uses this dynamic label rather than the
socket's name for labeling in the UI so the shown labels always match
the ones on the node itself.
Reviewed By: Hans Goudey
Differential Revision: http://developer.blender.org/D16563
===================================================================
M source/blender/editors/space_node/node_templates.cc
===================================================================
diff --git a/source/blender/editors/space_node/node_templates.cc b/source/blender/editors/space_node/node_templates.cc
index 1b7eadd336a..0027a965267 100644
--- a/source/blender/editors/space_node/node_templates.cc
+++ b/source/blender/editors/space_node/node_templates.cc
@@ -830,7 +830,7 @@ static void ui_node_draw_input(
sub = uiLayoutRow(sub, true);
uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT);
- uiItemL(sub, IFACE_(input.name), ICON_NONE);
+ uiItemL(sub, IFACE_(nodeSocketLabel(&input)), ICON_NONE);
}
if (dependency_loop) {
More information about the Bf-blender-cvs
mailing list