Access a precomp as a CompItem not as an AV Layer In this case, I am selecting a precomp in the timeline but the problem is that this code below returns the AVLayer object instead of a CompItem object. How can I select the layer but get it as aCompItem. I need to do this because I want to then access the layers inside the precomp.
var comp = app.project.activeItem.selectedLayers[0];
alert(comp);
Well, I found my own answer. I just needed to access the source property.
var comp = app.project.activeItem.selectedLayers[0].source;
alert(comp);