-
Combining text.sourceText.split with SourceRectAtTime
I’m working on a Premiere live text template with dynamic links to After Effects graphics. I’m using text.sourceText.split expression in a text animator to highlight certain words. I would like the highlighted words to be in a box. Is it possible to somehow combine the text.sourceText.split expression with a SourceRectAtTime expression for only the selected words?
The text.sourceText.split expression used is:
highlight = thisComp.layer(“[HIGHLIGHT WORDS]”).text.sourceText.split(“+”);
result = 100;
for (i = 0; i < highlight.length; i++){
if (textIndex == parseInt(highlight[i],10)){
result = 0;
break;
}
}
result
This is great for coloring words, but can I somehow make these words appear in a box? I’ve tried creating a boxed font variant and put this in a layer below, but I guess theres a better/simpler way to achieve this?