ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
John Gate
Script : Layer with timeremap enabled , add a keyframe and then move it to different time
on Mar 22, 2019 at 6:08:36 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





Return to posts index

Dan Ebberts
Re: Script : Layer with timeremap enabled , add a keyframe and then move it to different time
on Mar 22, 2019 at 6:42:50 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



Return to posts index

John Gate
Re: Script : Layer with timeremap enabled , add a keyframe and then move it to different time
on Mar 22, 2019 at 6:53:42 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


Return to posts index


Dan Ebberts
Re: Script : Layer with timeremap enabled , add a keyframe and then move it to different time
on Mar 22, 2019 at 7:04:03 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?



Return to posts index

John Gate
Re: Script : Layer with timeremap enabled , add a keyframe and then move it to different time
on Mar 22, 2019 at 9:01:46 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.


Return to posts index

John Gate
Re: Script : Layer with timeremap enabled , add a keyframe and then move it to different time
on Mar 23, 2019 at 12:02:15 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]