0
Explorer
,
/t5/after-effects-discussions/using-applypreset-on-duplicated-layer-in-script/td-p/15157998
Feb 16, 2025
Feb 16, 2025
Copy link to clipboard
Copied
Hi. I'm having some strange behavior when I use applyPreset on a duplicated layer. I have a duplicated layer, and I use applyPreset on it, but the preset is applied to the originial layer:
var originalLayer = app.project.activeItem.layers[1];
var duplicatedLayer = originalLayer.duplicate();
var presetFile = new File("the/path/to/my/preset");
duplicatedLayer.applyPreset(presetFile); //The preset is applied on originalLayer
Is this a normal behavior? If it is, is there a workarround?
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
Feb 16, 2025
Feb 16, 2025
You have to make sure that all layers other than your target layer are deselected. I usually deselect all layers in the comp, then select the target layer, then apply the preset.
Community Expert
,
/t5/after-effects-discussions/using-applypreset-on-duplicated-layer-in-script/m-p/15158126#M261773
Feb 16, 2025
Feb 16, 2025
Copy link to clipboard
Copied
You have to make sure that all layers other than your target layer are deselected. I usually deselect all layers in the comp, then select the target layer, then apply the preset.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Cefalopodo
AUTHOR
Explorer
,
LATEST
/t5/after-effects-discussions/using-applypreset-on-duplicated-layer-in-script/m-p/15158516#M261782
Feb 16, 2025
Feb 16, 2025
Copy link to clipboard
Copied
Thanks! It works
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

