[Bf-blender-cvs] [2fbdf9a] master: Fix frame node text ignoring blank lines
Campbell Barton
noreply at git.blender.org
Thu Feb 18 23:30:27 CET 2016
Commit: 2fbdf9adc7486498d378a938f034e4ef3ee840d1
Author: Campbell Barton
Date: Fri Feb 19 09:22:26 2016 +1100
Branches: master
https://developer.blender.org/rB2fbdf9adc7486498d378a938f034e4ef3ee840d1
Fix frame node text ignoring blank lines
===================================================================
M source/blender/editors/space_node/drawnode.c
===================================================================
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index a130436..ed207e2 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -441,9 +441,14 @@ static void node_draw_frame_label(bNodeTree *ntree, bNode *node, const float asp
for (line = text->lines.first; line; line = line->next) {
struct ResultBLF info;
- BLF_position(fontid, x, y, 0);
- BLF_draw_ex(fontid, line->line, line->len, &info);
- y -= line_spacing * info.lines;
+ if (line->line[0]) {
+ BLF_position(fontid, x, y, 0);
+ BLF_draw_ex(fontid, line->line, line->len, &info);
+ y -= line_spacing * info.lines;
+ }
+ else {
+ y -= line_spacing;
+ }
if (y < y_min) {
break;
}
More information about the Bf-blender-cvs
mailing list