Copy link to clipboard
Copied
I want to modify from a script a property of a filter that points to a layer.
This type of property has two values:
1) The layer name
2) the choice between "Source" - "Masks" - "Effects and Masks"
To modify the 1st property I do: property("Layer").setValue(index), and it works 🙂
but how to change the 2nd one ?
Copy link to clipboard
Copied
Dropdown controls are simply enumerated arrays. A simple .setValue([2]) could do the trick.
Mylenium
Copy link to clipboard
Copied
OK but what to put before the .setValue([2]) to say that we want to access the "Source"part (B) ?
The logical solution would be to be able to :
but it doesn't work 😞
If we can't access to B to change the Source, one solution is to precompose the layer, transferring the attributes to the new composition !
Copy link to clipboard
Copied
I'm not aware of any way to get to "Source" - "Masks" - "Effects and Masks" via scripting.
Copy link to clipboard
Copied
It's not possible. The only way to "set" the "Source / Masks / Effects & Masks" dropdown is to save an ffx preset of the effect with the dropdown set. Include it in your script as a binary string, then create the ffx file for the user at some location on their computer, and apply the preset using Layer.applyPreset().
Copy link to clipboard
Copied
Thank you Constantin for this idea.
Copy link to clipboard
Copied
Still no solution to this problem other than going through an ffx?
Copy link to clipboard
Copied
Unfortunately not. It's really annoying, and the inability to read and properly set this property is creating a lot of barriers in my scripts...
Copy link to clipboard
Copied
They must have a lot more urgent things to do before dealing with this super annoying problem!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now