Activity › Forums › Adobe After Effects › AE SCRIPTING: Change the time of a position keyframe
-
AE SCRIPTING: Change the time of a position keyframe
Posted by Jorge Granados on January 24, 2017 at 8:06 pmI 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.
Walter Soyka replied 9 years, 3 months ago 3 Members · 5 Replies -
5 Replies
-
Blaise Douros
January 24, 2017 at 8:28 pmThis is going to sound like a stupid question, but why not just move the keyframe?
-
Walter Soyka
January 24, 2017 at 8:39 pmThis 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 | RenderBreak [blog] | Profile [LinkedIn] -
Jorge Granados
January 24, 2017 at 11:19 pmI’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 🙂
-
Jorge Granados
January 24, 2017 at 11:24 pmThat’s what I didn’t want to hear ☹
Now I’m having problems copying my easeIn and easeOut to the new keyframes haha
-
Walter Soyka
January 25, 2017 at 2:25 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 | RenderBreak [blog] | Profile [LinkedIn]
Reply to this Discussion! Login or Sign Up