After a few months, I have received some feedback on my Visual Studio 2005 Paint.NET Effect Plugin Template and have made a few updates:
BoltBait wrote:
Sepcot, I would recommend the following changes to your template:
- Add the code from my project listed above to your template for adding the effect to a submenu. There is some code and the reference to it.
- The OK and Cancel buttons should be anchored bottom & right instead of top & left.
- Add a "// place your public variables here" and "// set your default values here" to the token file.
- Add a few "using" lines to open up access to various controls (like I did in the project linked above.)
Nice template, by the way! Thanks!
-- http://paintdotnet.12.forumer.com/viewtopic.php?p=24136#24136
Add Submenu Option
To add the submenu option, I have altered the EffectPlugin.cs file as follows:
public static string StaticSubMenuName { get { return null; } } public EffectPlugin() : base(EffectPlugin.StaticName, EffectPlugin.StaticIcon, EffectPlugin.StaticSubMenuName, true) { }
If you do not want to place your effect in a submenu leave as is. If you want to add to a submenu, change null to the name of the submenu you want to add your effect to: i.e. "Blurs"
Other Changes
The other changes are straight forward. I updated the OK and Cancel buttons to anchor to the bottom/right, added comments to EffectPluginToken.cs to identify where to place/set your variables, and added using PaintDotNet; to EffectPluginConfigDialog.cs to provide access to various Paint.NET controls (such asAngleChooserControl).
Note: the code contained in the template can be built as is, but it won’t yield you any interesting effects. In fact, it will just render a configuration dialog box with “OK” and “Cancel” buttons that do nothing to alter the canvas.
Effects Plugin Template Files
- Effects Plugin Template – zip files and save into your Visual Studio 2005 “Project Templates” directory (typically: My Documents\Visual Studio 2005\Templates\ProjectTemplates\)