Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-06-09 17:13:09 +0300
committerHans Goudey <h.goudey@me.com>2021-06-09 17:13:09 +0300
commitec98bb318b938f829859ee7dfa1a96d1171c2a64 (patch)
tree8f6c55e5e39857c249611b2402667f4742ed8be9 /source/blender/editors/space_node
parent3a7ab62eac05e700372a2b17b901b0181be82abe (diff)
UI: Add the option to not display some socket labels
This commit adds a flag to disable displaying some socket labels which just redundant eye sores. We still want to have a label, because that information can potentially be accessed elsewhere in the UI. The flag is used in a few geometry nodes. Differential Revision: https://developer.blender.org/D11540
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc
index c6fa6c78f05..1d4c3b67387 100644
--- a/source/blender/editors/space_node/drawnode.cc
+++ b/source/blender/editors/space_node/drawnode.cc
@@ -3541,6 +3541,8 @@ static void std_node_socket_draw(
return;
}
+ text = (sock->flag & SOCK_HIDE_LABEL) ? "" : text;
+
switch (type) {
case SOCK_FLOAT:
case SOCK_INT: