Skip to main content
Participating Frequently
March 2, 2020
Question

How do I start/stop (toggle hold key frame) expression?

  • March 2, 2020
  • 2 replies
  • 3222 views

Hi, I am trying to get the wiggle expression (position) to start and stop at a specific time. I tried using slider, but setting toogle keyframe does work. I don't want a gradual interpolation but a definite start and stop. 

This topic has been closed for replies.

2 replies

Community Expert
March 3, 2020

To make wiggle start at one second and end at 3 seconds add an expression with if statements like this:

if (time > 1 && time < 3) 
	wiggle(10, 20)
else 
	value
	

time is always counted in seconds unless you divide it by the comp frame rate, but that should get you started.

Participating Frequently
March 3, 2020

thanks for the expression it worked well. i modified it for it to deal with frame rate, which would work better with my workflow. Is something like this acceptable?? :

fStart = 100; 
fStop = 400; 

tStart = framesToTime(fStart);
tStop = framesToTime (fStop);

  if ((time > tStart) && (time < tStop)){ 
      wiggle(1,10); 
  }else{ 
      value; 
  }

 

 

OussK
Community Expert
Community Expert
March 3, 2020

can you share the expression you use?

Participating Frequently
March 3, 2020

hi, i used this expressioN: wiggle(effect("Slider Control")("Slider"),effect("Slider Control 2")("Slider")) 

with the first slider for frequency and the second for amplitude