This file contains 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
/* | |
* This AfterEffects script sorts layers in a composition according to their in-points. | |
* | |
* 1. Save this file as "sortlayers.jsx". | |
* 2. Select a target composition in project panel of your AfterEffects. | |
* 3. Run "sortlayers.jsx" from Menu->"File"->"Scripts"->"Run Script File". | |
*/ | |
app.beginUndoGroup("Sort layers"); | |
var item = app.project.activeItem; | |
if (item != null && item instanceof CompItem) { |