Skip to main content
Inspiring
May 14, 2023
Question

Setting the key for the "Curves" property of the Curves effect.

  • May 14, 2023
  • 1 reply
  • 272 views

Hi all.
For a property whose value is numeric, you can set the time key using the setValueAtTime(time, value) function.
For the Curves effect, the Curves property has a non-numeric value. In manual mode, the key is set.
Is there a way to set the time key, via a script expression?

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
May 14, 2023

You can set a key with a script like this (but you can't set the value):

app.project.activeItem.layer(1).property("Effects").property("Curves").property("Curves").addKey(1);

and you can manipulate the time with an expression like this (but not the value):

valueAtTime(time-1)