So the “1” is the time in seconds that the key will be added at, every composition have a frame rate or fps(frames per secons),
lets say you typed 1 in the custom value of the time property inside the “set” line, if the frame-rate of your composition is 30 the key will be added at frame 30, if you will change the value to 2 the key will be added at frame 60, in any second you have 30 frames so the calculation is
“the seconds” * “the frame rate”.
in your case the key was added at frame 25 and 50 because the time was set to 1seconds and 2 seconds and the frame-rate was 25fps.
- if you want to set the keyframe at s specific frame number that not depends on the frame rate of the composition you can do that too, you have to calculate the time,
[your desired frame number] / [the frame rate].
for example lets say you want to add a key at frame 5 and the frame rate is 25fps, 5/25 = 0.2, 0.2 will add you the key exactly at frame 5 of the composition.
(keep in mind that you don’t need to know the frame rate in advance, you can get the composition frame rate automatically).
The “30” is the value of the keyframe, if you will test the automation again you will see that the opacity key at frame 25 contain the value 30%, and at frame 50 the value is 100% so the custom value inside the “action” will be the value of the key.
For adding a key at the the time indicator of the composition you first have to create an item variable and select the loop name, then the property “containing comp”, this variable will be the active composition and will open more actions and properties, one of the properties is the “time indicator”(the current time of the comp).
In the “set” line that sets the time property, you can change the value from “custom” to the new item variable name and then select the “time indicator” property, this will add the key at the current time,
for more keys you can add for the calculation “time indicator” + 1, this will add a key 1 second after the time indicator.
example 1: adding keyframes at specific frames(not seconds).
Set Keyframes-Frames.json (9.4 KB)
example 2: adding a keyframe at the time indicator and 1 more keyframe after 10 frames.
Set Keyframes current.json (9.4 KB)