Forum Replies Created

  • Moises Lanzini Stobbe

    December 21, 2023 at 4:34 pm in reply to: Position based on dropdown selection

    That works perfectly, I was overcomplicating everything, I think I stuck to what I had already done so much that it blinded me to better ways to do it!

    Thanks so much!

  • Moises Lanzini Stobbe

    December 21, 2023 at 11:28 am in reply to: Position based on dropdown selection

    Sorry about that, I really didn’t go much into what it should do.

    Basically I want the ease() animation to happen at the time of each keyframe in the dropdown menu, it should start at the keyframe time, and end after 10 frames (0.33 seconds, since my comp is 30fps). The ease() should also be from the current position (stored as pos1, pos2 and pos3) to the next one selected by the new keyframe.

    Here’s how I am trying to make it work:

    • dropdown is currently at “item 1”, so current position is as stored in “pos1”
    • create keyframe in the dropdown changing it to “item 2”
    • when the playhead reaches the keyframe, it eases from “pos1” to “pos2” for 10 frames
    • now the position is “pos2”

    In the screenshot I have several test keyframes to try out the expression, it mostly works, but when the playhead is nearer to the next keyframe, than the “current” one the position changes suddenly to [960, 540] (literally happens from one frame to the next), which is the default position of the null before the expression was applied, but it should stay at the last keyframe stored position until the next keyframe is reached and a new ease() happens.

    I think my issue is related to using only nearestKey(), since it is expected to simply tell what is the nearest keyframe to the current time, and that would mean that when you are halfway between keyframes, the next one is closer, but I can’t see why the code is changing the position and not holding it.

    I’d be happy to provide any further details if needed 🙂

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy