Switch Effect Parameter after every duplication

Hey guys:

My goal is to duplicate a layer 2 times and apply a Shift Channels effect to it, that has different settings for each layer. First one should have Alpha from Red, second Alpha from Green and third Alpha from Blue.

Is that even possible to do? I get it to work that I get the layer duplicated and the effect applied already. Should only apply different settings to each effect :smiley:

Thanks in advance

Hi @gutster,

Welcome to the forum! I apologize for the delay in my response; I typically aim to reply faster.

Yes, it is definitely possible to achieve what you’re looking for. In fact, there are multiple ways to accomplish this using Automation Toolkit. I wanted to provide you with a simple approach to get started:

  1. Duplicate the selected layer twice.
  2. Save the index of the selected layer as a variable.
  3. Create two number variables to store the indexes of the duplicated layers. You can calculate their indexes using the index of the original layer, knowing that they will be positioned above the original layer in the layer stack.
  4. Loop over the layers in the active composition.
  5. If the current layer index matches the index of the original layer, iterate through the effects of that layer. If you find an effect named “Shift Channels”, loop over its properties and search for a property named “Take Alpha From”. Set this property to the desired option number in the dropdown list.
  6. Repeat the same process for the index of the first duplicate and the index of the second duplicate.

I have attached the automation as a JSON file, and I’ve added comments for each line to provide further clarification.
Split Alpha.zip (3.6 KB)

Please let me know if you have any further questions.
Thanks,
Alon

4 posts were split to a new topic: Execute other Script from an Automation