-
Set Opacity of exactly LAST character only to Zero with expression?
Hi
Is there a way to set OPACITY of the last character in a text line?
I do not want to use CUT as I need it to still be there.I tried that
The God of Ebberts supplied this, but I don’t know how to set opacity to 0 instead of cutting it.cut = 1;
len = thisComp.layer(“TEXT SOURCE”).text.sourceText.length – cut;
thisComp.layer(“TEXT SOURCE”).text.sourceText.substr(0,len)This is in the text source
I can’t figure out how to use it in an opacity animator expression selector…I am using SourceRectAtTime to duplicate a text box and stick the duplicates to the top and bottom of itself.
Because Curved letters go above and below the baseline, SourceRectAtTime will give you different box sizes if there are or are not curves, (or descenders if using lowercase).
So :
“LINE 01”
is bigger than
“LINE X1”To get around this, I am putting a “|” At the start and end of a different source layer and using that as the source text.
This will make the whole text box always the same size no matter what.I can kern out the first “|”
But I need to turn off the last”|”
Cutting it is not the right thing
I wonder if length -1 will work…
cut = 1;
len = thisComp.layer("TEXT SOURCE").text.sourceText.length - cut;
thisComp.layer("TEXT SOURCE").text.sourceText.substr(0,len)