Expressions/Scripts/Presets

Moderator: Paul Tuersley

 
manjunath7472
Topic Author
Posts: 3
Joined: Mon Jun 01, 2015 8:42 am

How to Get all Nested Comps into an Array from current comp?

Fri Jun 05, 2015 8:14 am

Can anyone please share a function() or idea ..to get all nested Comps into a single array from current active comp.??Am banging my head on wall to find atleast one property where its linked to Nested comp and Main comp in Project window.I saw "Reveal in Composition" is Linked to Parent Comp but no property in extended script guide.

AFX COMP
---------
MainComp(Precomp(Precomp(Precomp(Precomp))))

Script
--------
var myComp=app.project.activeItem;
var myLayers=myComp.layers;
var allComps= new Array();

for(i=1;i<myComp.numLayers;i++){
curLayer=myLayers[i];

if(curLayer.source instanceof CompItem==true){

allComps = function getAllNestedComps(??);


}

Who is online

Users browsing this forum: No registered users and 4 guests