Page 1 of 1

saving animation presets

Posted: April 2nd, 2013, 4:13 am
by SFR75
Hello,

Can you, guys and girls, confirm that it's impossible to save animation preset within an AE script ?
I see applyPreset, but I don't see any savePreset. Very unforunate, since the script I need to write
needs to create new presets and save some other information (layer name for FX that references
other layers, such as textures).
Impossible ?


Sincerely
M

Re: saving animation presets

Posted: April 9th, 2013, 3:53 am
by Paul Tuersley
I'm not aware of a way to have a script save an animation preset. But you could create your own kind of preset system by saving all the information you need into a presets.txt text file, which you could read and reapply later. It sounds like maybe you want to save information that's not handled by an animation preset, so maybe this is a better solution anyway

Paul.

Re: saving animation presets

Posted: April 30th, 2013, 10:16 am
by Alan Eddie
//Snippet from one of my scripts, using the executeCommandID method (I know, not the best solution)

function exectuteCommandID(theCommand){
app.executeCommand(app.findMenuCommandId(theCommand));
}

function saveUsualFXPreset(){
alert("1.Please select the effects you want to save.\n2.Save the preset as \"1.ffx\" in the Corner Cutters Folder."+
"\n(Otherwise this script will not work.)\n 3.Change the help tip for the button in settings.","UsualFX1 preset")
var theLayer= app.project.activeItem.selectedLayers[0];
if (theLayer.selectedProperties.length==0){alert("You need to select some effects or properties of one layer...");}
else{exectuteCommandID("Save Animation Preset...");}
}