FORUMS: list search recent posts

custom timeline "forward X frames"

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andy Engelkemier
custom timeline "forward X frames"
on Apr 13, 2017 at 8:05:39 pm

page up = go forward 1 frame
Shift + page up = go forward 10 frames

Anyone know of a way, even if it's a script, to customize that a bit?

We're tracking something that's untrackable, so we have to do it by eye. So basically, going forward a set distance and setting keys. Then going halfway between those, then halfway between those, etc until everything looks tracked smooth enough.

I've wanted this before anyway. I usually work in 30fps, and moving forward 15 frames is usually more helpful to me. I usually don't do things in 1/3 second increments. Half second is fine for quick fades and whatnot.

Anyway, it seems like it's kind of a personal choice, which may even change on each project. So I'm looking for some ways to do it. Even if it's just a script.
And since it might be a script, don't reply with "nope can't be done." Although, it is always lovely when someone responds saying something can't be done, then the very next post someone responds with how to do it. That first person has Got to feel like an idiot.


Return to posts index

Walter Soyka
Re: custom timeline "forward X frames"
on Apr 14, 2017 at 9:26:22 am

Can't be done!

Just kidding. Let's write two quick scripts. Copy, paste and save these with a text editor.

Here's the first, 01_jumpXFramesForward.jsx:
jumpFrames = 15;
try {
app.project.activeItem.time += jumpFrames*app.project.activeItem.frameDuration;
} catch(err) {};


And the second, 02_jumpXFramesBackward.jsx:
jumpFrames = -15;
try {
app.project.activeItem.time += jumpFrames*app.project.activeItem.frameDuration;
} catch(err) {};


Save these in your scripts folder (NOT ScriptUI!), then use these instructions to assign them keyboard shortcuts:
http://aescripts.com/knowledgebase/index/view/faq/use-keyboard-shortcut/

You can even override the normal Shift+PageUp and Shift+PageDown assignments for TimeStepBackMore and TimeStepForwardMore in the shortcuts file (though I expect execution may not be quite as snappy).

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

Andy Engelkemier
Re: custom timeline "forward X frames"
on Apr 14, 2017 at 12:03:42 pm

Ah, thanks. You've helped me in additional ways as well. My laptop has no page keys. I have to hit function+up/down arrow. I think that doesn't work in conjunction with the shift key. That's what I get for going with a 15 inch laptop.

You also made me laugh when you said snappy. It reminded me of hitting the spacebar to pause on a project with a few layers and effects. Not snappy. The opposite of snappy.

So anyway, I'm used to not snappy. I think most of us are. So We'll see how not snappy it might be.


Return to posts index


Andy Engelkemier
Re: custom timeline "forward X frames"
on Apr 14, 2017 at 1:38:31 pm

So I got it to work. I hadn't done that before, and ran into some things I thought I'd share for other people.

First, not sure why people don't use the windows shortcut. This will make this easier. Instead of saying this:
(Windows) \Users\\AppData\Roaming\Adobe\After Effects\
Say this:
(Windows) %AppData%\Adobe\After Effects\

Just copy from percent, to the slash. Hit Win+R (that opens Run) paste, and hit enter. No need to go searching around for usernames and whatnot.

I didn't quite catch why Walter here numbered the scripts. I thought I was just going to assign the script to the hotkey. But it doesn't quite work like that. You assign a hotkey to the slot the script is in. So it's best to keep your hotkeyed scripts in order. As soon as I noticed that, it was a "duh" moment.

Also, PageUP and PageDOWN. NOT PageUp and PageDown. It's case sensitive. Those of us that don't script often probably wouldn't key into that right away. I was determined to get it to work so tried a few times.


Also am I missing something? Each time it didn't work I would close after effects, make a change, then open after effects again. That's sort of time consuming. Any way to just force it to read the scripts and all that again? Probably not, but thought I'd ask.


Also, this is just as snappy as if it were not a script. Well, it might be different, but it's nominal if at all. I hit the key over and over quickly and it keeps them all. I wasn't sure if if would lag and skip one. It lags, but remembers, just like the normal hotkey.

It would be Really cool to be able to adjust the number on the fly using another hotkey built into the script. But I'm not sure you can store global variables easily.

Hopefully those notes help anyone searching later having troubles. If I didn't have some extra time today I probably would have given up immediately.


Return to posts index

Walter Soyka
Re: custom timeline "forward X frames"
on Apr 14, 2017 at 3:05:13 pm

Thanks for posting the clarifying notes, Andy.

[Andy Engelkemier] "Also am I missing something? Each time it didn't work I would close after effects, make a change, then open after effects again. That's sort of time consuming. Any way to just force it to read the scripts and all that again? Probably not, but thought I'd ask. "

The script only works when there's an active item. For example, if your focus is on the project panel, then that script will not work because there is no active comp. Press the backslash key ('\') to active the timeline or viewer first, rather than opening and closing Ae.

This variation on the script will help in most circumstances like that by shifting the focus to the active viewer if it's elsewhere (eliminating the need for you to shift focus manually):

jumpFrames = 15;
try {
app.project.activeItem.time += jumpFrames*app.project.activeItem.frameDuration;
} catch(err) {
try {
app.activeViewer.setActive();
app.project.activeItem.time += jumpFrames*app.project.activeItem.frameDuration;
} catch(err) {}
};


Of course, you could also get a keyboard macro program and use it instead of the script to catch your Shift+PageUp/Down and send the correct number of PageUp or PageDown.

Or you can jump in time. If time is displayed in frames, press Alt+Shift+J, then +15 and Enter to go forward 15 frames, or +-15 to go backwards 15 frames.


[Andy Engelkemier] "It would be Really cool to be able to adjust the number on the fly using another hotkey built into the script. But I'm not sure you can store global variables easily. "

That could be done, but I'd need more time than I have right now to work it out. Again, a keyboard macro program like AutoHotkey on Windows or Keyboard Maestro on macOS might get you a faster solution.

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]