Sign in to follow this  
Sepcot

Visual Studio 2005 - Effect Plugin Template

Recommended Posts

If anybody is interested in writing plugin's in vb.net, I have converted the template to vb.net and it works.

Then why not post it?

Done... well... I actually posted an updated version (uses Indirect UI), but it is posted.

Is there any chance this can be updated to work with the new plugin system introduced in 3.0.

The VB version does use the "new plugin system" (I assume you mean the IndirectUI system) and it can be easily converted to C# if anyone wants to convert it.

Share this post


Link to post
Share on other sites

Thank you for the sample btw. It helped me get going but I have a question.

What are the inputs of this function:

public override void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, int startIndex, int length)

parameters is my EffectPluginConfigToken where I get user input information. But the rest of the parameters are not very clear and there is no metadata for them. Thank you.

On the topic of languages I agree that your choice of languages comes from the project but I will just mention that you can make game development with C# also (XNA). For windows programming I would not use anything else than C#. I am also on the same path you are and I feel awful that I will need to deal with C++, its a ugly mess for me to write on C++ and to read code almost impossible. C# sharp is clean, elegant and supports metadata which is very important for making code readable and usable. Just my 2 cents, I am just a student so you shouldn't really listen to me.

Share this post


Link to post
Share on other sites

On the topic of languages I agree that your choice of languages comes from the project but I will just mention that you can make game development with C# also (XNA). For windows programming I would not use anything else than C#. I am also on the same path you are and I feel awful that I will need to deal with C++, its a ugly mess for me to write on C++ and to read code almost impossible. C# sharp is clean, elegant and supports metadata which is very important for making code readable and usable. Just my 2 cents, I am just a student so you shouldn't really listen to me.

Not true, A pro in programming could recommend C++ while another one could recommend C#. Its all about preferences, for me I perfer C# over anything, like you i feel that C++ is a ugly mess as well.But lets not make this topic about which language is better as it will bring us nowhere.

Share this post


Link to post
Share on other sites

Hi All,

I've just written my first Paint.NET plugin. Many thanks to sepcot and boltbait for the template and instructions.

With the latest version of PDN, some PaintDotNet.Effects.Effect constructors are now obsolete. I used this instead:

public EffectPlugin()
           //: base(EffectPlugin.StaticName, EffectPlugin.StaticIcon, EffectPlugin.StaticSubMenuName, true)  // Obsolete
           //: base(EffectPlugin.StaticName, EffectPlugin.StaticIcon, EffectPlugin.StaticSubMenuName, EffectFlags.Configurable | EffectFlags.SingleThreaded)
           : base(EffectPlugin.StaticName, EffectPlugin.StaticIcon, EffectPlugin.StaticSubMenuName, EffectFlags.Configurable)
       {
       }

Is there an instruction manual on what all the numerous classes and methods are for in the Pdn DLLs?

Where's the best place to post my test plugin for some advice and feedback?

Share this post


Link to post
Share on other sites
Is there an instruction manual on what all the numerous classes and methods are for in the Pdn DLLs?
For now, other plugins' source code and Intellisense.

Share this post


Link to post
Share on other sites

The obsolete constructors are still around to allow old/legacy plugins to keep working (there's no reason to break them).

In v3.5, I have decorated those methods so that they won't show up in Intellisense. That assumes you're using Visual Studio of course.

Share this post


Link to post
Share on other sites

I just got Visual Studio 2010 Professional, and in the folder

...\Visual Studio 2010\Templates\ProjectTemplates

there are three other folders (Visual Basic, Visual C#, Visual Web Developer)

but I noticed that in the 2008 folder these three folders are not there, so

do I put this template in ...\ProjectTemplates or in ...\ProjectTemplates\Visual C# ?

Share this post


Link to post
Share on other sites

First: Have you updated the references for the latest build of Paint.Net (mentioned previously in this thread, here: )?

Second: Telling us that the template "does not compile" tells us very little. Posting the contents of the Error List would help us help you.

Third: The template does compile if you take the time to follow @BoltBait's guide listed in this thread:

Share this post


Link to post
Share on other sites

Great stuff -- thanks for doing this!

Just one thing: when I compiled this using Visual C# 2010 (Express), Paint.net didn't initially recognise the plugin. The fix was to go to Properties and change "Target Framework" from 4.0 to 3.5.

Are there any potential issues with that?

Share this post


Link to post
Share on other sites

Some of the links seem to have changed.

You can go here: http://www.sepcot.co...tPluginTemplate for a brief walkthrough of the code contained within the template.

http://www.sepcot.com/blog/2006/11/PDN-EffectPluginTemplate

http://www.sepcot.com/blog/2007/03/PDN-Effect-Plugin-Template-Updated

Converted lurker here, so could this be confirmed as correct please?

Share this post


Link to post
Share on other sites

Hi there,

I am still learning and doing a lot of practicing on Paint.NET. Would you recommend I download this? I am still learning how to download/create new brushes.

I don't quite understand how to do all the programming aspects of the effects or how I could create my own but I definately want to learn how.

Thank You B)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this