I`m new to After Effects, so sorry if question if question is stupid. But i`m stuck and Scripting Guide doesn`t help.
I need to extract information about positions of all Motion trackers in each frame. For now i see it that way:
Code: Select all
for (var h=1; h <= app.project.numItems; h++){
if (app.project.item(h) instanceof CompItem){
for (var i=1; i <= app.project.item(h).numLayers; i++){
if (/*CHECK if layer is Motion tracker*/){
var xy = app.project.item(h).layer(i).transform.position.valueAtTime(currTime, preExpression);
}
}
}
}
Maybe there is more convenient way to iterate Motion trackers layers?