FORUMS: list search recent posts

Generate Text with script issue

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ben Christie
Generate Text with script issue
on Oct 20, 2018 at 12:55:56 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);


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]