Skip to content

Instantly share code, notes, and snippets.

@space-pope
Last active August 21, 2016 19:52
Show Gist options
  • Save space-pope/b36cbb65554d345fc01df16560b0a7db to your computer and use it in GitHub Desktop.
Save space-pope/b36cbb65554d345fc01df16560b0a7db to your computer and use it in GitHub Desktop.
var master = app.project.item(1), // master comp has to be the top comp in the project bin
template = app.project.item(2); // and the comp you're looking to make different versions of should be right below it
// the only layers expected in the master comp are different versions of the text layer you're trying to change
for (var i = 1; i <= master.numLayers; i++) {
var textVersion = master.layer(i),
name = textVersion.property("Source Text").value,
copy = template.duplicate();
copy.name = name;
// the layer you're changing is expected to be the top layer in the template LT
copy.layer(1).property("Source Text").setValue(name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment