Text Layer Spacing and Expression Voodoo
Hi there,
Background:
I'm editing a video in Premiere that needs to have animated bullet points float in at appropriate times. Some bullet points will be single lines and others will be multi-line. I decided to create an AE comp that had 5 text layers that I could then edit from within Premiere. My plan was to then duplicate that comp in Premiere for each section of bullet points that I needed. I ran into a problem when I had a bullet point that exceeded the width of the comp in AE. I could use a paragraph text field and have it automatically wrap, but that presented a problem when I added another paragraph text layer below the first one for the second point and so on. I didn't know of a way to make the second layer automatically move downwards when the first layer exceeded one line. Another problem was automatically indenting the text after the text wraps to the next line.
What I tried:
I thought that I might be able to just manually add newline characters from within Premiere to allow me to position the text where I want it. This started out promising and turned into a nightmare rather quickly. I tried pressing the enter key while in the text field in Premiere. That just submitted the text field. I tried copying and pasting a newline character from a note into the editable text field in Premiere. That kind of worked, but it made the behavior of the text field in Premiere rather unpredictable and unwieldy. Then, I tried just putting a '\n' character into the field in Premiere. That resulted in a \n appearing in the actual comp instead of creating a newline. Then, I went into AE to try and write an expression that turned the '\n' into an actual newline. I came up with this expression:
text.sourceText = text.sourceText.replace('\\n', '\n');
That worked. When I put a \n in the Premiere text field, I got a newline. However, when I tried to modify the script to include an indent, it continued to properly replace the \n with a newline, but it didn't add the spacing afterwards. I tried using '\s' characters, '\t' characters, and actual spaces. This is the script I tried for that:
text.sourceText = text.sourceText.replace('\\n', '\n ');
I contacted Adobe support about that, and they really had no answer for me.
What I need:
I need a way to either automatically or manually change vertical spacing of AE comp text layers from within Premiere so that the text layers I'm using as bullet points don't overlap on one another and they can remain spaced properly as a single line point or a multi-line point. I also need a way to automatically indent lines of points that wrap onto more than one line.
I realize that there's probably a simple way to do this that will fix everything, but I certainly don't know what it is. I would love some help with this one. Thank you so much in advance.
Jaydon