Skip to main content
Participating Frequently
February 7, 2024
Question

Expression for individual keyframes

  • February 7, 2024
  • 1 reply
  • 347 views

Dear community,

 

I've encountered an expression challenge while working on a template. In short, I need to link two specific keyframes (with the same value) to a slider control or a similar solution.The other two keyframes denote the in position with a different x value. In the attached screenshot, I've highlighted the two keyframes, which need to be controlled and represent the out position for a shape layer. Has anyone faced a similar issue and found a solution?

 

Thanks a lot!

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
February 7, 2024

It depends on exactly what you're doing, but it might be like this:

s = effect("Slider Control")("Slider");
if (time < key(2).time)
  ease (time, key(1).time, key(2).time, [s,key(1).value[1]],key(2).value)
else if (time < key(3).time)
  value
else
  ease(time, key(3).time, key(4).time, key(3).value, [s,key(4).value[1]])