Apply Layer mask with batch play

Good day everyone!

I am looking for a way to apply the layer masks with code.

Alchemist has given me this when I apply it manually.
image
InvokeCommand

{
   "_obj": "invokeCommand",
   "commandID": 5095,
   "kcanDispatchWhileModal": true,
   "_isCommand": false
}

delete

{
   "_obj": "delete",
   "_target": [
      {
         "_ref": "channel",
         "_enum": "ordinal",
         "_value": "targetEnum"
      }
   ],
   "apply": true,
   "_isCommand": false
}

the second delete just turns the “_isCommand” to true.

Does anyone have a solution?

I think you might be using Alchemist wrong. Turn on Listener and then create a mask. Check your filters in Alchemist and IIRC you have to select Listener at the top too (not at my PC right now). Then if you create a mask, there should be a make event.

Actually, when you are applying a mask you are deleting it with the flag “apply” so it will perform side effect before deletion. So I think this is correct.

But there still should be a make event, shouldn’t it?

Yes but only if the mask does not exist.

Just checked in my plugin how I create masks, so yes - first I delete (in case there is one already) and then make new one :slight_smile: