Skip to main content
Participant
January 5, 2020
Answered

After Effects Scripting is there a way to "Save Animation Preset" Methods?

  • January 5, 2020
  • 1 reply
  • 2679 views

After Effects Scripting is there a way to "Save Animation Preset" Methods?

<After Effects Scripting Guide> can be carried out in the following to "Animation"->"Apply Animation Preset".

-------------------------------------------------

Layer applyPreset() method

appapp.project.item(index).layer(index).applyPreset(presetName);

-------------------------------------------------

But there's no way "Animation"->"Save Animation Preset".

 

Who knows if there is such a way?

Or script operations by pressed or onClick Methods?

 

This topic has been closed for replies.
Correct answer live_evil5410

They change per version, you can look them up with

 
app.findMenuCommandId('Save');
 
Not every button has one though FYI.

 


app.findMenuCommandId(text) is to get the window menu item numerical ID.
Execution code"app.executeCommand(3075);"then pop up a "dialog".
The numerical ID of 'Save' in it cannot be obtained by app.findMenuCommandId('Save').
But, if there is a way to simulate the keyboard input "C:\Program Files\Adobe\Adobe After Effects CC 2019\Support Files\Presets\a.ffx" and then simulate the "onEnterKey" KeyboardEvent....
Maybe it can be done.It's just a little bit worse!what a pity!

1 reply

Mylenium
Legend
January 5, 2020

You will likely have to use the executeMenuCommand() function or whatever it is currently named and adress the numerical ID of the UI string. Regardless of this I can't see how this would even be relevant or useful. In order to save a preset some layers or properties have to be selected first, which will require an additional user interaction either way, so nothing is gained by having such a function in a script.

 

Mylenium

Participant
January 6, 2020

Thank you for your reply!!
In fact, I am saving the value of "PropertyValueType.CUSTOM_VALUE" property Type.
At present, only. FFX supports value saving of this property Type,For example, "curves"、 "hue / saturation"... The Parameters inside cannot be obtained by script.
So I use "animation" - > "save animation preset" to save.
Then "save animation preset" cannot be operated with script
"Propertyvaluetype. Custom" has become a holy field!!! and there is no way to operate it externally...It's confusing to me!

Justin Taylor-Hyper Brew
Community Expert
Community Expert
January 8, 2020

You can use 

app.executeCommand(3075);

But it just simulates the button click, you still have to choose where to save it, but that's the only way to save Animation Presets far as I know.