Last active
August 21, 2016 19:52
-
-
Save space-pope/b36cbb65554d345fc01df16560b0a7db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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