Skip to main content
Inspiring
April 7, 2023
Question

Edit the second parameter in Layer Control with JavaScript

  • April 7, 2023
  • 2 replies
  • 424 views

This topic has been closed for replies.

2 replies

damomoyuAuthor
Inspiring
April 7, 2023

I often encounter some png/psd with dirty alpha, so I want to batch process these png/psd.
I use "Autotrace" to get a clean alpha, then set a new mask to the layer with the "set matte" effect, and then save as png/psd
I tried to automate the whole process with a script, but after querying, knowing ae doesn't help me click "OK" in "Autotrace", and I don't know how to set the option in "take matte from layer" in "set matte" to " mask"

Mathias Moehl
Community Expert
Community Expert
April 7, 2023

due to the Chinese labels, I am not 100% sure what exactly you want to set.

You can set track matte layer and track matte type with AVLayer.setTrackMatte():

https://ae-scripting.docsforadobe.dev/layers/avlayer.html#avlayer-settrackmatte

 

Or are you trying to set the parent?

https://ae-scripting.docsforadobe.dev/layers/layer.html#layer-parent

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
damomoyuAuthor
Inspiring
April 10, 2023

My problem is not solved yet. . .