Skip to main content
Participant
August 2, 2023
Question

AE Script : How to access to a mask property : "Source" - "Masks" - "Effects and Masks"

  • August 2, 2023
  • 3 replies
  • 1504 views

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 ?

3 replies

ConstantinMaier
Inspiring
August 3, 2023

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().

Participant
August 3, 2023

Thank you Constantin for this idea.

Bruno Quintin
Inspiring
May 24, 2025

Still no solution to this problem other than going through an ffx?

Dan Ebberts
Community Expert
Community Expert
August 2, 2023

I'm not aware of any way to get to "Source" - "Masks" - "Effects and Masks" via scripting.

Mylenium
Legend
August 2, 2023

Dropdown controls are simply enumerated arrays. A simple .setValue([2]) could do the trick.

 

Mylenium

Participant
August 2, 2023

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 :

  • access A with : property("Layer")[1].setValue()
  • access B with : property("Layer")[2].setValue()

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 !