Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

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

Community Beginner ,
Aug 02, 2023 Aug 02, 2023

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 ?

TOPICS
Scripting
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 02, 2023 Aug 02, 2023

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

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 02, 2023 Aug 02, 2023

Layer.png

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 !

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2023 Aug 02, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 03, 2023 Aug 03, 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().

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 03, 2023 Aug 03, 2023

Thank you Constantin for this idea.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 24, 2025 May 24, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 25, 2025 May 25, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 25, 2025 May 25, 2025
LATEST

They must have a lot more urgent things to do before dealing with this super annoying problem!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines