• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

app.executeCommand: Next Keyframe & Previous Keyframe

Explorer ,
Oct 13, 2022 Oct 13, 2022

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

 

 

TOPICS
Scripting

Views

184

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 14, 2022 Oct 14, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 14, 2022 Oct 14, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

LATEST

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.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines