Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Script : Layer with timeremap enabled , add a keyframe and then move it to different time

  • Script : Layer with timeremap enabled , add a keyframe and then move it to different time

    Posted by John Gate on March 22, 2019 at 6:08 pm

    Hi there,

    I have a layer where timeremap is enabled, and i add a keyframe and then i want to move that keyframe to different time.

    i want to emulate manual behaviour where you add keyframe and then drag/move to different location.

    How can i achieve that?

    Thanks in advance for the amazing community helping here

    myLayer.timeRemapEnabled = true;
    var addedKeyframe = myLayer.timeRemap.addKey(time);

    //now how do i move addedKeyframe to a different location

    John Gate replied 7 years, 1 month ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    March 22, 2019 at 6:42 pm

    You can’t move keyframes. The best you can do is create a new keyframe, copy all the attributes of the one you wanted to move, then delete the original. Not hard, just kind of a pain.

    Dan

  • John Gate

    March 22, 2019 at 6:53 pm

    Reason i want to move is because when we move manually in after effect it acts differently
    and creating a new doesnt solve it

  • Dan Ebberts

    March 22, 2019 at 7:04 pm

    So why not just set the keyframe at time you actually want it, and change its value to what it would have been at the other time?

  • John Gate

    March 22, 2019 at 9:01 pm

    Actually im just the developer trying to simulate manual process, and dont know how’d i get end result because of time remapping involved.

  • John Gate

    March 23, 2019 at 12:02 pm

    Looks like i have avoided dragging approach and will be using a different to avoid this case.
    still have a question but will create another relevant post

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