Copy link to clipboard
Copied
Hi!
I have run command line doing "Next keyfame" and "Previous keyframe" but it doesn't work.
Does anyone have a way to fix it instead of using a "Smart Keyframe Navigator" script?
app.executeCommand(2520); // Next Keyframe
app.executeCommand(2519);// Previous Keyframe
Copy link to clipboard
Copied
Those two lines by themselves don't do anything. You need of course to fetch the selected layers/ properties and check the state to contextualize the operation, which is what the script you mention does. Why try to reinvent the wheel?
Mylenium
Copy link to clipboard
Copied
I tried it and it didn't work even though I selected opacity property
The above code is just that I forgot to delete 1 line
Copy link to clipboard
Copied
I would not use menu commands in scripting unless it is really necessary. It is much more reliable to use
nearestKeyIndex and keyTime etc. to find the times of keys and set the comp's time to that value. The menu commands rely on many assumptions, like a comp being active, and don't give helpful error when this is not the case. And they don't work at all, if Ae is running headless.