[Bf-blender-cvs] [85c8dd6c968] master: Fix: Display color sockets without labels correctly
Hans Goudey
noreply at git.blender.org
Tue Oct 19 21:04:14 CEST 2021
Commit: 85c8dd6c968334fc8c58a1f4ba1b145996510120
Author: Hans Goudey
Date: Tue Oct 19 14:04:03 2021 -0500
Branches: master
https://developer.blender.org/rB85c8dd6c968334fc8c58a1f4ba1b145996510120
Fix: Display color sockets without labels correctly
Don't build a manual property split layout when the label
for the socket is hidden.
===================================================================
M source/blender/editors/space_node/drawnode.cc
===================================================================
diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc
index f7231df85a0..afe36922b09 100644
--- a/source/blender/editors/space_node/drawnode.cc
+++ b/source/blender/editors/space_node/drawnode.cc
@@ -3577,9 +3577,14 @@ static void std_node_socket_draw(
}
break;
case SOCK_RGBA: {
- uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
- uiItemL(row, text, 0);
- uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
+ if (text[0] == '\0') {
+ uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, "", 0);
+ }
+ else {
+ uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
+ uiItemL(row, text, 0);
+ uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
+ }
break;
}
case SOCK_STRING: {
More information about the Bf-blender-cvs
mailing list