Skip to content

Instantly share code, notes, and snippets.

@ff6347
Created August 25, 2012 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ff6347/3468163 to your computer and use it in GitHub Desktop.
Save ff6347/3468163 to your computer and use it in GitHub Desktop.
swap position AE
// swap position of two layers
var layers = app.project.activeItem.selectedLayers;
var pos1, pos2;
for (var i = 0; i < 2; i++){
if(i ==0) pos1 = layers[i].position.value;
if(i ==1) pos2 = layers[i].position.value;
// layers[i].position.selected = true;
};
layers[0].position.setValue(pos2);
layers[1].position.setValue(pos1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment