A small script for applying Presets

Scripting for After Effects

A small script for applying Presets

Postby ChrisMarriott on 03/15/2019, 12:39 pm

Hi there,

VERY new to scripting but use a ton of AEscripts tools in After Effects.

I'm trying to create a very small script that will apply pre-sets all at the same time to a selected layer.

I currently have this but it doesn't seem to work. Scripts within the *** they are not in the script file.

*********************************

var presetList = [

'c:/Program Files/Adobe/Adobe After Effects CS6/Support Files/Presets/BrainStorm/Brainstorm Exposure Correction.ffx',

'c:/Program Files/Adobe/Adobe After Effects CS6/Support Files/Presets/BrainStorm/Brainstorm Screen Enhancer.ffx',

'c:/Program Files/Adobe/Adobe After Effects CS6/Support Files/Presets/BrainStorm/Brainstorm Primatte Keyer Default.ffx',

'c:/Program Files/Adobe/Adobe After Effects CS6/Support Files/Presets/BrainStorm/Brainstorm Samurai.ffx',

'c:/Program Files/Adobe/Adobe After Effects CS6/Support Files/Presets/BrainStorm/Colour Fix For Blacks.ffx',];

for (var i = 0; i < presetList.length; i++)

{

app.project.activeItem.selectedLayers[0].applyPreset(presetList[i]);

}

********************************

If I run it from a docked UI panel for scripts nothing happens, if I try it as a JavaScript button in FT ToolBar 2 it doesn't do anything, but if I launch it from the File/Run/Script route I just get an error saying that the ffx file is not a file or folder?

I've tried guessing different ways of writing the pre-set location but don't seem to be having any luck.

If anyone has an idea on how to get this working it would be awesome.

Thanks,

Chris
ChrisMarriott
 
Posts: 1
Joined: 03/15/2019, 12:38 pm
System Specs: Build: Element x64 2.2.2 (2160.hotfix)

OS: Microsoft Windows 10 Pro 64-bit 10.0.17763

CPU: AMD Ryzen Threadripper 1950X 16-Core Processor
RAM: 130945MB

GPU Vendor: NVIDIA Corporation
GPU: GeForce GTX 1070/PCIe/SSE2
GPU Driver: 24.21.13.9811
GPU RAM: 8192MB
GPU Code: 0

CL0: GeForce GTX 1070 (100.0%) (GL Interop)

Return to After Effects Expressions