Copy link to clipboard
Copied
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?
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.
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!
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Where can I get the UI string numerical ID?
Can this function complete the task in "save animation preset as":?
For example "save", How can I get the "save" UI string numerical ID?
Copy link to clipboard
Copied
They change per version, you can look them up with
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
Hey, did you ever find a way to make it work?
Copy link to clipboard
Copied
You could simulate a keytroke. We figured it out in this thread: