7
$\begingroup$

In Blender 2.8,the VSE gives the ability to add text but only on a single line. In order to add text on a new line, a new layer needs to be created .

Are there any operators which can be used to add text on a new line (like \n in Python) in the text block so that text can be added on a new line and in the same text layer?

$\endgroup$
2
  • $\begingroup$ Really disappointing that with the brand new Font feature,the VSE's text block only accepts 1 line per strip. Tried using the new line character \n in a bunch of ways,but it doesn't output the next string on a new line. Not sure if there are any other newline characters other than \n in C++/Python. However on using the \n command ,the output in the Info window shows an additional `. If I am not mistaken, ` is used to concatenate strings in C++. It means Blender automatically concatenates strings entered in the text block. Is there any way around this? [![enter image description h $\endgroup$
    – srt111
    Commented Jun 7, 2019 at 16:40
  • $\begingroup$ I think the reason it adds the slash is because if it didn't, it would read the string as, line1(insert a new line)line2. They wanted to avoid that (I guess just because people who don't code would be confused when they were trying to write I like pasta\noodles and it showed ``` I like pasta oodles ``` So, whenever a backslash is inserted into the string, they automatically add another backslash in front of it, essentially allowing the string to output everything that is written literally. This isn't necessarily accurate (just my thoughts), but it would explain why they add the slash. $\endgroup$ Commented Mar 27, 2020 at 17:14

4 Answers 4

2
$\begingroup$

In Blender2.9 , Wrap-Width slider can be used to place words on separate lines.

enter image description here

$\endgroup$
1
$\begingroup$

Workaround 1:

As starzar said you can use word wrap and leading spaces. As of writing this Blender 3.0.0 and earlier has some bugs involving word wrap and spaces.

Workaround 2:

Setting the text strip's text via the scripting console circumvents whatever check blender is doing and interprets '\n' as a newline character. Quickest way to do this is:

  1. Select the text strip in the video editor.
  2. Go to the scripting console, paste this command with the text you want inside the quotes, then hit enter. bpy.context.scene.sequence_editor.active_strip.text = "first line\nsecond line"
  3. Go back to the video editor, the text will be on multiple lines. You can't copy-paste the weird character that appears in text strip's text, sadly.

enter image description here

$\endgroup$
0
$\begingroup$

Found a way around this, even if not very comfortable - Just use the wrap width to reduce max line size, and add quite a lot of white space at the end of each line. It's much easier to do this with a script, even if a bit of copy pasting in text editor or notepad can do the job too.

$\endgroup$
0
$\begingroup$

As an alternative to using the scripting console, you can use the non-breaking-space character " ".

(On Windows, in Notepad, you can get this character by holding Alt and typing 255 on the number-pad).

  1. Put your text in a text editor and Find & Replace all spaces with a non-breaking-space character.
  2. Replace line-breaks with a single real space, so everything is all on one line.
  3. Add more non-breaking-space characters as needed before lines that are too short to cause wrapping. Optionally lower the "Wrap Width" if possible so you don't have to add so many.

Example:

Here I am using the character instead of the non-breaking-space character for illustrative purposes.

Use:

Hello▲world!▲How▲have▲you▲been▲doing? I▲am▲fine,▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ thank▲you.

To get:

Hello world! How have you been doing?
I am fine,
thank you.
$\endgroup$

You must log in to answer this question.

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