-
applyPreset Method Not finding Path
Hi all,
I’m writing a script where I’ll need to apply an animation preset to a group of layers. I have the exact path pasted into a path variable, and I believe everything else is correct, but it’s still saying “unable to call applyPreset” because of parameter 1.
Any ideas on why this is not working?
Also, is there a way to get script error messages on a bigger window somewhere other than just the info panel on the bottom of extend script?Below is part of the code.
Thanks!
-Timapp.beginUndoGroup("Undo");var proj = app.project;
var myLayers = app.project.items.layers;
var items = app.project.items;
var myComp, myLayer, myTime, myName;
var presetPath = "C:\Program Files\Adobe\Adobe After Effects CC 2015\Support Files\Presets\Backgrounds\Apparition.ffx";
var myPreset = File(presetPath);function creation(name,number,time,duration){
this.name= name;
this.number = number;
this.time=time;
this.duration = duration;//myName = name.toString;
myComp = items.addComp(name, 1920,1080,1,duration,29.976);
i = 0;
var width = myComp.width;
var height = myComp.height;
var aspect = myComp.pixelAspect;
var duration = duration-time;
var myLayer = myComp.layers.addSolid([0,0,0],name,width,height,aspect,duration);
myLayer.applyPreset(myPreset);};
creation("Begin",6,15,300);
Tim Franklin
Watchout System Programmer/Compositor – CBS Sports
Freelance Visual Effects Artist/ Video Editor
http://www.TimSFranklin.com