PaxonJollock Posted March 28, 2017 Share Posted March 28, 2017 Where can I find the official plugin developer documentation, that shows exactly what API my DLL has to make available to PDN, and exactly what PDN objects are available for me to use? The description of all the data types? Also I'm interesting in developing every kind of plugin, not just effects plugins. Googling just leads me to tons of sites distributing unauthorized plugin packs. Quote Link to comment Share on other sites More sharing options...
Pixey Posted March 28, 2017 Share Posted March 28, 2017 Perhaps this may be of assistance: https://www.getpaint.net/doc/latest/index.html . Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
BoltBait Posted March 28, 2017 Share Posted March 28, 2017 1 hour ago, PaxonJollock said: Where can I find the official plugin developer documentation Here: https://forums.getpaint.net/index.php?/topic/109990-how-to-write-an-effect-plugin-tutorialsresources/ Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
PaxonJollock Posted March 29, 2017 Author Share Posted March 29, 2017 23 hours ago, Pixey said: Perhaps this may be of assistance: https://www.getpaint.net/doc/latest/index.html . In which section exactly does it talk about (a) what types of plugins can get created, (b) how to do so? I've looked through all of them, and used Google, and not found it. Quote Link to comment Share on other sites More sharing options...
PaxonJollock Posted March 29, 2017 Author Share Posted March 29, 2017 23 hours ago, BoltBait said: Here: https://forums.getpaint.net/index.php?/topic/109990-how-to-write-an-effect-plugin-tutorialsresources/ This is an excellent resource about how to write an effects plugin using CodeLab, and I'm very grateful for it. However, while this is a great starting point, it only talks about using Visual Studio as an afterthought. And it doesn't describe the object model that PDN makes available nor the functions that can be written. And it doesn't mention the other two kinds of plugins at all. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 29, 2017 Share Posted March 29, 2017 Such documentation doesn't exist. Perhaps it should, but few people like writing documentation. Here's rough/simplified overview: - To make an effect, you create a class that derives from the Effect class that's in the paint.net assemblies. - When your effect class is invoked (when you open the plugin), it spawns an EffectConfigDialog class, and EffectToken class. -- You can define your own EffectConfigDialog and EffectToken classes, or IndirectUI will do it for you (if you derive from PropertyBasedEffect instead of Effect) - When you change something in the GUI (the EffectConfigDialog), the value from the GUI control gets bound to a property in the EffectToken. - When the method in your effect executes, it fetches the values of the EffectToken properties, and uses them as the variables in your code that manipulates the image. ^^^^ I should really turn that into a nice chart. Here are some of the Types you should be familiar with: - ColorBgra - very similar to Color, but different structure, and provides some useful methods - Surface - represents a collection of BgraColor pixels. Individual BgraColors in a Surface can be accessed like this MySurface[x, y] - RenderArgs - Not really sure how to describe this one. It's like a container for Surfaces... - PdnRegion - similar to a Region. Usually utilized to define the exact selection, as they can be complex sometimes. 2 Quote June 9th, 2023: Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
BoltBait Posted March 29, 2017 Share Posted March 29, 2017 Well, sorry, but my tutorials are about as official as you're going to get. But, you're right, they are not complete. I'm not part of the paint.net development team, but I started writing tutorials as I began understanding how plugins worked as a way to help others. And, as there was no official documentation, I worked with the early plugin developers to understand the limits and capabilities of the plugin system. (You can still read the CodeLab thread from the beginning to chart my progress.) As for other types of plugins, I've never written a filetype plugin. But, you can be sure that if I ever do, I'll be sure to write a tutorial on how to do it. The only other type of plugin is "shapes" and you can find information on how to design and code custom shapes here: Since you feel that the current set of documentation is lacking, you can write some yourself! Play with paint.net, tinker, figure out how it works, then write down what you found! That's what I did and you can do the same. I'm sure there are many people who would benefit from any tutorial you care to write. 1 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 30, 2017 Share Posted March 30, 2017 Here's a chart I made. It shows IndirectUI effect plugins, and also custom effect plugins. Any Corrections are welcome and encouraged. Blue Rectangles: Base Classes you derive from. Black Ellipses: Classes you create Green Ellipses: Classes IndirectUI creates "behind the scenes" Blue Lines: Shows class derivation (show the base class) Red Lines: Shows the flow of Token values Black Lines: Shows Classes being invoked from other classes 2 Quote June 9th, 2023: Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted March 30, 2017 Share Posted March 30, 2017 I like that @toe_head2001! If you added the info from your previous post it the chart would be awesome Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 30, 2017 Share Posted March 30, 2017 2 hours ago, Ego Eram Reputo said: If you added the info from your previous post it the chart would be awesome Add the info to the bottom of the chart, right? (adding it inline doesn't make sense, or does it?) Quote June 9th, 2023: Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 31, 2017 Share Posted March 31, 2017 (edited) Here's the updated chart with explanations at the bottom. Hopefully more neat & clean too. EDIT: fixed cosmetic issues Edited March 31, 2017 by toe_head2001 2 Quote June 9th, 2023: Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted March 31, 2017 Share Posted March 31, 2017 Thanks @toe_head2001. This has real potential. I might have a play with it over the coming weekend. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
toe_head2001 Posted March 31, 2017 Share Posted March 31, 2017 10 minutes ago, Ego Eram Reputo said: This has real potential. I might have a play with it over the coming weekend. Want the source file? It's a .odg file. Or if you want, I can put it up on draw.io or something similar. Quote June 9th, 2023: Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted March 31, 2017 Share Posted March 31, 2017 Thanks but I'll just fiddle with it in paint.net. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
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.