Hello,
I've been trying to make a simple script in AE CC 2018 to create a null object and rename it, then apply an already-created animation preset to it.
The first half works:
var myComp = app.project.activeItem;
var myNull = myComp.layers.addNull(myComp.duration);
myNull.name = "Wipe Duration Control";
However I can't for the life of me figure out how to set up the second half. I tried the following in a separate script as to not mess up the first half:
var myNull2 = app.project.activeItem
myNull2.applyPreset(File("~/Users/Noah/Documents/Adobe/After Effects CC 2018/User Presets/Automated Wipes/Wipe Duration Control.ffx"));
but I just get syntax errors.
I've also tried this way of doing things:
var myNull2 = app.project.activeItem
var presetPath = “Macintosh HD/Users/Noah/Documents/Adobe/After Effects CC 2018/User Presets/Automated Wipes/Wipe Duration Control.ffx”;
Var myPreset = File(presetPath);
myNull2.applyPreset(myPreset);
But still no luck. Does anyone see what I'm doing wrong? This seems like the most rudimentary of scripting functions, so it's frustrating to miss something that must be under my nose.
Thanks!