FORUMS: list search recent posts

AE SCRIPTING: Change the time of a position keyframe

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jorge Granados
AE SCRIPTING: Change the time of a position keyframe
on Jan 24, 2017 at 8:06:08 pm

I have a null with a keyframe in position set at second 5. I want to select that keyframe with my code and change it's time value to 2 so it appears at second 2 in the timeline. Thnaks for the answers.


Return to posts index

Blaise Douros
Re: AE SCRIPTING: Change the time of a position keyframe
on Jan 24, 2017 at 8:28:34 pm

This is going to sound like a stupid question, but why not just move the keyframe?


Return to posts index

Jorge Granados
Re: AE SCRIPTING: Change the time of a position keyframe
on Jan 24, 2017 at 11:19:50 pm

I'm trying to assemble a whole project template almost by its own with a script, so I just wrote a little example of what I need to know to add it to my script :)


Return to posts index


Walter Soyka
Re: AE SCRIPTING: Change the time of a position keyframe
on Jan 24, 2017 at 8:39:25 pm

This is painful, but there is no method in scripting for moving a keyframe. You must read the values of the keyframe, write a new keyframe with those values at the new time, and delete the old keyframe.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Jorge Granados
Re: AE SCRIPTING: Change the time of a position keyframe
on Jan 24, 2017 at 11:24:04 pm

That's what I didn't want to hear ☹

Now I'm having problems copying my easeIn and easeOut to the new keyframes haha


Return to posts index

Walter Soyka
Re: AE SCRIPTING: Change the time of a position keyframe
on Jan 25, 2017 at 2:25:08 pm

[Jorge Granados] "Now I'm having problems copying my easeIn and easeOut to the new keyframes haha"

See Property Object on p. 124 in the After Effects CS6 Scripting Guide [link], and pay special attention to the methods at the bottom of p. 125 and the top of p. 126. You have to make sure to recreate all the interpolation and tangent properties of the keyframe.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

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