onsager Posted July 7, 2008 Posted July 7, 2008 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. Quote
onsager Posted July 15, 2008 Author Posted July 15, 2008 Perhaps the posting was too unintelligible. Anyway, to give myself an answer to the question: I was able to solve the problem by inheriting a customized class from BitmapLayer, carrying the necessary information. Adding such objects to the documents layer list did the trick. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.