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:
authorPablo Vazquez <pablo@blender.org>2021-05-07 18:12:30 +0300
committerPablo Vazquez <pablo@blender.org>2021-05-07 18:12:39 +0300
commit8f04ddbbc62631db4802ded6c26366c400361335 (patch)
tree8bc893160248295768989a861cfa144773c80e45 /source/blender/editors/space_node/drawnode.c
parent8d6264ea12bfac0912c7249f00af2ac8e3409ed1 (diff)
Node Editor: Show frame label only when a label is set
Avoids having frames with the word "Frame" on top, resulting in less visual noise. (users were working this around by adding a space as label name). Differential Revision: D11193
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 5110c14ef4d..fa89d797076 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -456,7 +456,9 @@ static void node_draw_frame(const bContext *C,
}
/* label */
- node_draw_frame_label(ntree, node, snode->runtime->aspect);
+ if (node->label[0] != '\0') {
+ node_draw_frame_label(ntree, node, snode->runtime->aspect);
+ }
UI_block_end(C, node->block);
UI_block_draw(C, node->block);