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

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

Community Beginner ,
Aug 02, 2023 Aug 02, 2023

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 ?

TOPICS
Scripting

Views

672

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

Mylenium

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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 !

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thank you Constantin for this idea.

Votes

Translate

Translate

Report

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