Page 1 of 1

applyPreset() On Windows

Posted: July 6th, 2009, 8:42 am
by Jorritschulte
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

Re: applyPreset() On Windows

Posted: July 6th, 2009, 9:27 am
by Dan Ebberts
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

Re: applyPreset() On Windows

Posted: July 7th, 2009, 6:45 am
by Jorritschulte
Thanks :D ! Works like a charm!