How to change timeline duration and have updates relate to new time?

I’m not 100% but i think the ‘set new time’ function actually just jumps the current location along the timeline to that time, rather than change the length of the timeline.

What I have done when I wanted something like you’re trying to do, is create a timeline of duration 1 second, with value going from 0-1. You can then grab a reference to the timeline and use the ‘set play rate function’ to change how fast it runs. Set play rate to (1/desired duration) and you’ll get what you want. So in your case, if you have a timeline of length 1 second, and set the play rate to 1/3, you’ll get a timeline that now takes 3 seconds to complete.

I’ve only used this with linear float tracks though, I haven’t really needed to do anything else with it, i’m not sure if there’s a way to move keys in code like you’re after (but i haven’t really looked either).

24 Likes