Created
September 21, 2013 01:12
-
-
Save benwurth/6646000 to your computer and use it in GitHub Desktop.
Simple After Effects Script that moves the markers from an AV layer to a new null layer.
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
app.beginUndoGroup("Move Markers to Null"); //begins the undo group | |
//Variables | |
var curItem = app.project.activeItem; //creates a variable that holds the selected comp | |
var curLayer = curItem.selectedLayers[0]; //creates a variable that holds the selected layer | |
var oldMarkers = curLayer.property("Marker"); | |
function main() | |
{ | |
var nullLayer = curItem.layers.addNull(curItem.duration); //create our null object | |
for (i=1; i<=oldMarkers.numKeys; i++) | |
{ | |
nullLayer.property("Marker").setValueAtTime(oldMarkers.keyTime(i), oldMarkers.keyValue(i)); | |
} | |
} | |
main(); //main function | |
app.endUndoGroup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment