Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to automatically increase keyframe values (1, 2, 3, 4, etc...)

New Here ,
Mar 01, 2025 Mar 01, 2025

I have created a counter in a composition. I also have keyframes with interpolation of Hold. I want to copy and paste hundreds of this keyframe and configure it so that each keyframe has a value of +1 of the prior keyframe. I could do this manually, but is there a smarter way to do it?

 

Thanks for help!

New User
TOPICS
How to
81
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 02, 2025 Mar 02, 2025

This sounds like something that would proably be better done with an Expression.

Is there a reason you want hundreds of keyframes?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 02, 2025 Mar 02, 2025

Thank you for replying.

 

I will have a composiiton in AE that will count the number of times an action happens. The counter will increase incrementally at different times in the composition, which I will have to place manually in the Timeline. I'm OK with that.

 

But what I want to do is set up the composition with the counter and all the keyframes ready with their individual values. The first keyframe will have a value of 0. The one after that, 1. The final key frame will have a value of 300.

 

I know I can duplicate keyframes by copying and pasting. That's easy enough. But each keyframe has to have its own value. I could go into each one and manually enter those values, but I am curious to know if there is a formulaic way of doing it, so the values are created automatically when I set all this up.

 

Think of Excel. I have a starting cell with a value of 0 and then a formula in the next cell that references the first with the statement [prior cell + 1]. And the cell after that has the same. I can stretch that out three hundred times to get cells with incremental values from 0 to 300.

 

If you have any thoughts on the expression solution, please let me know. In the mean time, I'll Google away.

 

Many thanks.

New User
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 02, 2025 Mar 02, 2025
LATEST

I think you are describing a situation where you only want whole numbers to appear.  Try this expression on your slider:

Math.floor(value)

Math.floor rounds the value down to the nearest integer.  So 1.9 becomes 1, then when the slider reaches 2 or 2.1 etc... it becomes 2.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines