Copy link to clipboard
Copied
Hello
I have a layer (footage) called Layer1
I want to duplicate it to Layer 2 (the name does matter)
I want to select Layer1 and apply a Preset called BG1
I want to select Layer2 and apply a Preset called Key1
How do I do that and is it even possible?
Rob
Copy link to clipboard
Copied
Something like this:
var myLayer1 = myComp.layer("Layer 1");
var myLayer2 = myLayer1.duplicate();
var myPreset1 = File(path to preset 1);
var myPreset2 = File(path to preset 2);
myLayer1.applyPreset(myPreset1);
myLayer2.applyPreset(myPreset2);
Dan
Copy link to clipboard
Copied
Hello Dan
Many Thanks for your knowledgeable help
The only thing is, this script apply both thePreset1 and thePreset2 to theLayer1 only and not thePreset1 to theLayer1 and thePreset2 to theLayer2.
What I am doing wrong... And also I would like to duplicate from theSelectedLayers...
Much thanks
Rob
var myComp = app.project.activeItem;
var myLayer1 = myComp.selectedLayers[0];
var myLayer2 = myLayer1.duplicate();
var myPreset1 = File("/Applications/Adobe After Effects CS5/Presets/Bg.ffx");
var myPreset2 = File("/Applications/Adobe After Effects CS5/Presets/Key1.ffx");
myLayer1.applyPreset(myPreset1);
myLayer2.applyPreset(myPreset2);
Copy link to clipboard
Copied
Ah yes, I forgot about that little twist. After you apply the first preset, you probably need to do this:
myLayer1.selected = false;
myLayer2.selected = true;
Then apply the preset to Layer 2.
Dan
Copy link to clipboard
Copied
Dan
I truy thank you for bailing me out with this script. Your expertise and kindness in handling the forum is invaluable. I don't know what I would have done without your help. Thank you so much for your professional and effective help. I hope others will return the favor to you.
Rob
{
app.beginUndoGroup("DuplicateLayerAddPresets");
var myComp = app.project.activeItem;
var myLayer1 = myComp.selectedLayers[0];
var myLayer2 = myLayer1.duplicate();
var myPreset1 = File("/Applications/Adobe After Effects CS5/Presets/Bg.ffx");
var myPreset2 = File("/Applications/Adobe After Effects CS5/Presets/Key1.ffx");
myLayer1.applyPreset(myPreset1);
myLayer1.selected = false;
myLayer2.selected = true;
myLayer2.applyPreset(myPreset2);
app.endUndoGroup();
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now