Opacity from 100 to 0, in to out

What type of scripts do you need?

Moderator: byronnash

Post Reply
jmullen
Posts: 2
Joined: December 5th, 2008, 10:11 am

I've got a hundred layers, all of slightly different lengths, all of which need to have their opacity fade from 100% at their in point to 0% at their out.

I've got one of Dan Ebberts' expressions on a layer that fades opacity up from 0 to 100

(rampTime = 1;

if (time < in_point + rampTime){
linear(time,in_point,in_point + rampTime,0,100)
}else if (time < out_point - rampTime){
100
}else{
linear(time,out_point - rampTime,out_point,100,0)
})

but neither can I figure out how to reverse it, so the layer fades out from 100% at it's in point to 0%, nor can I figure out if it would be easier to have a script so I can apply this to multiple layers.

Any advice would be welcome.
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

This should be all you need:

linear(time,inPoint,outPoint,100,0)

After you apply it to one layer, select the Opacity property then Edit > Copy Expression Only, select all other layers, paste.

Dan
Post Reply