AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sun May 19, 2013 5:02 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: A script to turn off layers
PostPosted: Tue Jun 01, 2004 12:54 pm 
Offline

Joined: Fri May 21, 2004 3:03 pm
Posts: 20
This script will turn off numbered layers in selected comps. To make it work for you, select the comps in the Project Window, adapt the script below to turn off the layers you want (in this example layers 6 and 7 will be turned off), and then run the script. This is obviously interesting only if you have a large project with loads of comps and only specific layers have to be turned off.


//Created by J.C. Burns

for (i = 1; i <= app.project.numItems; ++i) { //for/next loop goes through all Items
var curItem = app.project.item(i);

if (curItem instanceof CompItem) { //test if current item is a composition
if (curItem.selected) { //test if the comp is selected
curItem.layer(6).enabled = false;
curItem.layer(7).enabled = false;

}
}
}


Top
 Profile  
 
 Post subject: Re: A script to turn off layers
PostPosted: Sun Feb 01, 2009 11:48 am 
Offline

Joined: Sat Jan 31, 2009 1:48 pm
Posts: 1
I am new to the world of expressions with AE. I have basically created a 14 layer animation in AE (CS3) and need a script to turn off the last 4 layers when I loop the animations. The only way I know to incorporate expressions is by adding it to the layer directly. How do you ad an expression to a composition? I have exported this out as an .swf so I can play it as a header for my web page. I only want a few layers to repeat the 2 time around and so on. Any help would be greatly appreciated. :oops:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group