This is my first plugin for Paint.NET. I modified the DdsFileType sources, till I was able to load/save a proprietary file format.
I have still a particular problem:
For every file, my plugin creates some layers on the fly during the load process. Number and order depend on the sources content. So, I have to do a bit bookkeeping about the creation process. The gathered file-specific information becomes essential later for the saving step, because I cannot extract them exclusively from the Document.
So, how can I "link" this additional information (a list of integers in my case, but could be anything) to a document? I'm currently not able to see the way, how Paint.NET maintains more than one open document. When it comes to the FileTypes OnSave function I don't know, which particular document triggered the call and my "Metainformation" is lost.
I'm not yet in the effect plugins, but I guess, my problem reappears there. So more in general - how can I maintain access to document-specific user-defined information during the whole workflow?
BTW, what are these SaveConfigToken based classes for?
To be fair, I'm kind of a newbie in C#/.NET (but a seasoned C++ programmer). Quite possible, I'm missing something rather simple.