Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Generate Text with script issue

  • Generate Text with script issue

    Posted by Ben Christie on October 20, 2018 at 12:55 am

    Hi All,

    This piece of script works to do what I want (generating text, font, size, position in my comp) but for some reason if you change any of the character panel settings (font, paragraph style, etc) in AE before running the script, the script will inherit those changes rather than relying on it’s hard coded font stylings. Any ideas? I’m working in AE 2018 currently.

    var fpoText = myComp.layers.addText(“Lorem Ipsum”);
    var fpoDocument = fpoText.property(“ADBE Text Properties”).property(“ADBE Text Document”);
    var fpoControl = fpoDocument.value;
    myString = “Lorem Ipsum”;
    fpoText.position.setValue([768,94]);
    fpoText.label = 14;

    fpoControl.resetCharStyle();
    fpoControl.fontSize = 34;
    fpoControl.fillColor = [0, 0, 0];
    fpoControl.font = “SF Pro Text”, Semibold;
    fpoControl.text = myString;
    fpoControl.justification = ParagraphJustification.CENTER_JUSTIFY;
    fpoDocument.setValue(fpoControl);

    Ben Christie replied 7 years, 7 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy