Copy link to clipboard
Copied
It's possible to make a multi-layer filter plugin? The idea is: the user has open a multi-layer document, then execute the plugin and selects N layers of the document in the filter UI, and when clics "OK", the plugin create a new layer adding every selected layer pixel by pixel.
LAYER A LAYER B RESULT LAYER
0 0 5 5 5 1 1 2 1 1 1 1 7 6 6
0 0 0 5 5 + 1 1 3 1 1 = 1 1 3 6 6
0 0 0 0 5 1 2 3 2 1 1 2 3 1 6
Any advice?
Thanks!
Copy link to clipboard
Copied
You'll probably have to use a combination of automation and filter plugins wrapped into a single SuspendHistory call: e.g. create a new layer from the automation, run your GUI, run filter and read/write the actual pixel data from there.
Copy link to clipboard
Copied
You haven't told us exactly what you're trying to do, but What you described could also be done via a layer stack plugin.
Copy link to clipboard
Copied
A filter plug-in can read from any layer using the channel ports suite. See the Poor Mans Type Tool example. A filter plug-in can only write to the active layer. You cannot add a layer from a filter plug-in. You would need the auto/filter combo as Chris talks about. See the autofilter/hidden combo example or the format/auto for importing text files example.