-
Counting text fields that are not empty in an AE Essential Graphics template within Premiere
Hi again,
I’m still trying to figure out how to get this AE Essential Graphics template to work in Premiere Pro.
I have a three input fields in the template: the text.textSource of text layer “Heading 1 Line 1”, “Heading 1 Line 2” and “Heading 1 Line 3”.
Everything works fine in AE, but the code below that is supposed to return the number of text fields that has content, “crashes” when I open the template in Premiere.
Anyone has any idea how to fix this?
Thanks
Mikaeln = 3;
t1 = thisComp.layer("Heading 1 Line 1").text.sourceText;
t2 = thisComp.layer("Heading 1 Line 2").text.sourceText;
t3 = thisComp.layer("Heading 1 Line 3").text.sourceText;
if (t3 == "") {n = 2}
if (t2 == "" && t3 == "") {n = 1}
n