Copy link to clipboard
Copied
In AE 2021 and 2023 on Mac running macOS 13.6…
I have a field of source text.
I want to only show a single line of that text in a destination text box.
I'm talking about the line of text as displayed withink the width of a box, not the line of text as delimited by line breaks.
In the destination text box, I set a text animator to change the opacity of all the text apart from lines 3 to 4.
Range Selector. Index, Lines. Start 3.0 End 4.0 Offset 0.0
Whatever the source text is, I expect the third line only to be visible. Whether that source has linebreaks in it or not.
Depending on the type size of the destination text box, sometimes the third line is visible, sometimes none, sometimes the fourth.
How can I ensure that only the third line is visible - whatever the display font or font size and whether or not the source text has line breaks in it?
Cheers!
Copy link to clipboard
Copied
Indices are absolut. You would need an expression animator to calculate the index based on the actual input length. Otherwise this could also be easily achieved using source text processing with substr() and a suitable regular expression.
Mylenium
Copy link to clipboard
Copied
Thank you.
The input length in characters remains the same. The change in font size in the display text box changes what 'the third line of text' means. Have a look at the screen recording.
I need to show the third line as displayed, not the third paragraph as input. As the font size changes, AE shows a different line of text. Is this is a bug? Or does the definition of 'Line Index 3 to Line Index 4' change for some reason?
Cheers,
Copy link to clipboard
Copied
You need to work with line text, not paragraph text. you have no control over the wrapping inside a text box, not even with expressions. That's why your whole plan falls apart. The text can easily be clipped regardless of size with a track matte if that's what you really want.
Mylenium
Copy link to clipboard
Copied
Thank you. So, it's a bug in Text Animators. They can determine a line of displayed text in a text box, just not consistently.
The equivalent feature in Apple Motion (whcih I know much better) doesn't have this fault. It understands the concept of a line of text as displayed.
Cheers,
Alex4D