Search code examples
c#pluginspaint.net

Insert new image layer from Effect class


I'm attempting to insert a new layer programmatically into Paint.NET when called from an effect. I've decided against using Code Lab and have created a C# project that extends

PaintDotNet.Effects.Effect

I have been able to make the other adjustments as needed to the active surface but am required to modify a new layer. Any ideas regarding how to access the document's Layer Array from the effect?


Solution

  • I've solved this. Turns out, the abstract class that an effect plugin must extend has no way of manipulating anything other than the active surface. It would have been good for the Paint.NET developer(s) to expose some more elements such as the layers and the toolbar, but apparently there is nothing I can do at this point.