Created
September 29, 2018 13:21
-
-
Save aescripts/e7ec62ebad9cbac2155de58691f6a431 to your computer and use it in GitHub Desktop.
#AfterEffects #Script #KBar Moves the active comp's current time indicator by the defined amount
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Move by a predefined number of frames in the timeline.jsx | |
Moves the active comp's current time indicator by the defined amount | |
*/ | |
try{ | |
var framesToMove = -5; //make this a negative to move backwards | |
app.project.activeItem.time = app.project.activeItem.time + framesToMove * app.project.activeItem.frameDuration; | |
} | |
catch (e) {} |
How can this be modified to move by fractions of a second instead of number of frames?
Remove the multiplication by the frameDuration:
var timeToMove = -5; //in seconds
app.project.activeItem.time = app.project.activeItem.time + timeToMove;
Excellent . . . and so simple. Thanks! :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can this be modified to move by fractions of a second instead of number of frames? E.g.:
comp FPS = 24 then 0.5 sec = 12 frames;
comp FPS = 30 then 0.5 sec = 15 frames;
etc.
Thanks in advance!