applyPreset() On Windows

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Jorritschulte
Posts: 47
Joined: July 14th, 2008, 12:19 pm
Location: The Netherlands

Why does the 'applyPreset() Part' not work:

Code: Select all

var Proj = app.project;
var Comp = Proj.activeItem;

var Controller = Comp.layers.addSolid([255,0,0], "Controller", 100, 100, 1);

Controller.applyPreset("D:\Program Files\Adobe\Adobe After Effects CS3\Support Files\Presets\Behaviors\Drift Over Time.ffx");
The error is:
After Effects error: Unable to call "applypreset' because of parameter 1/ D...rt FilesPresetsBehaviorsDrift Over Time.ffc is not a File or Folder object

But The file is There...


Thanksin advance
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Try it this way:

Code: Select all

var presetPath = ("D:/Program Files/Adobe/Adobe After Effects CS3/Support Files/Presets/Behaviors/Drift Over Time.ffx");
var myPreset = File(presetPath);
Controller.applyPreset(myPreset);

Dan
Jorritschulte
Posts: 47
Joined: July 14th, 2008, 12:19 pm
Location: The Netherlands

Thanks :D ! Works like a charm!
Post Reply