Hello everyone!
I've been stucked for 2 days on script I'm writting
My objective is to apply a preset multiple times on properties of a layer (because there will be expressions with it in a separated function.)
When I select 2+ properties in Transform (Position, Rotation...) the preset is loaded 2+ number of times. Perfect.
But when I select 2+ properties, let's say inside an Effect on the same layer (Inside Color, Outside Color...) the preset is loaded only one time.
I would like it to load as many times as selected properties regardless if it's in Transform or Effect.
I tried many solutions with arrays, for loop but can't find a solution... what do I miss?
Many thanks in advance!!
Code: Select all
function applyPreset(){
var comp = app.project.activeItem;
var layers = comp.selectedLayers;
var presetPath = cheminDuDossierAssets+"myPreset.ffx";
var myPreset = File(presetPath);
layers[0].applyPreset(myPreset);
}