Created
August 25, 2012 17:23
-
-
Save ff6347/3468163 to your computer and use it in GitHub Desktop.
swap position AE
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
// 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