在 After Effects 中以编程方式更改 TextLayer 的文本

Gar*_*son 5 javascript after-effects

我正在使用 After Effects CS3 Javascript API 动态创建和更改合成中的文本图层。

或者至少我正在尝试这样做,因为我似乎找不到正确的属性来更改以更改 TextLayer 对象的实际文本。

Gar*_*son 4

嗯,下次一定要多读文档。

var theComposition = app.project.item(1);
var theTextLayer = theComposition.layers[1];
theTextLayer.property("Source Text").setValue("This text is from code");
Run Code Online (Sandbox Code Playgroud)