5
$\begingroup$

I want to display text with several lines in GN.

Especially my text is in the text editor, i copy paste it into the string node and i got...one line.

Is there a trick to insert more lines? What am i missing?

enter image description here

$\endgroup$
2
  • $\begingroup$ I'm not at a Blender computer right now, but what actually happens when you type "\n" for a line break? ...you would need a special character here. somehow. ...there is a node for this special char, as far as i remember. $\endgroup$
    – quellenform
    Commented Aug 21, 2022 at 7:40
  • $\begingroup$ then i got this: [1]: i.sstatic.net/ll0dR.jpg $\endgroup$
    – Chris
    Commented Aug 21, 2022 at 7:43

1 Answer 1

7
$\begingroup$

You could achieve the desired result by using each line as a separate string input, and linking them together with a Special Character as a Delimiter:

enter image description here

Another solution would be to write everything in one line, and set the width of the text field with Max Width. This would create automatic line breaks.


If you really want to write everything in a string value, you could use any character as a separator, and replace it with a Special Character:

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ That’s what I didn’t want to do because I am lazy…😬I hoped for a solution with one string node $\endgroup$
    – Chris
    Commented Aug 21, 2022 at 8:39
  • $\begingroup$ @Chris I understand, you could of course replace any character with the Special Character (see updated answer) $\endgroup$
    – quellenform
    Commented Aug 21, 2022 at 8:55
  • $\begingroup$ @Chris I have now looked at the source code: Apparently there really is no other way, unfortunately, because the line break really cannot be interpreted from the text. This is probably exactly why the Special Character node exists. $\endgroup$
    – quellenform
    Commented Aug 21, 2022 at 10:13
  • $\begingroup$ that's totally ok for me!! thanks! $\endgroup$
    – Chris
    Commented Aug 21, 2022 at 10:24
  • $\begingroup$ Is there roadmap for integration of multi-line input ? Currently, there is only text-editor editor, but it would be nice to have this feature in nodetree, or any developer wanting this ui feature to make addon that don't rely on the current text-editor. $\endgroup$ Commented Mar 16, 2023 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .