Expression in between key frames?

Scripting for After Effects

Expression in between key frames?

Postby Ampix0 on 04/7/2016, 7:07 am

So I import a song, convert to key frames and I have some data. I want to use this data on an effect on another layer. So pick whip and we are good. The challenge is, I only want to apply this expression in between two key frames.
Ampix0
 
Posts: 109
Joined: 05/13/2009, 6:23 pm

Re: Expression in between key frames?

Postby plae57 on 04/7/2016, 7:34 am

Ampix0 wrote:So I import a song, convert to key frames and I have some data. I want to use this data on an effect on another layer. So pick whip and we are good. The challenge is, I only want to apply this expression in between two key frames.


Maybe add a conditional statement to check to see if you are between these two key frames.
plae57
 
Posts: 574
Joined: 08/4/2014, 4:12 am

Re: Expression in between key frames?

Postby hans123 on 05/2/2016, 5:40 pm

Hello,

you can use this simple Expression:

timeToStart = 2;
timeToStop = 4;

if ((time > timeToStart) && (time < timeToStop)){
temp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
[temp, temp];
}else{
value;
}


or you delete the (Audio) keyframes before and after your keyframes.
See my Picture.

Hans
Attachments
start stop.jpg
hans123
 
Posts: 1099
Joined: 12/28/2012, 1:37 am
Location: Paris / France


Return to After Effects Expressions