Jump to content

Visual Studio 2005 - Effect Plugin Template


Sepcot

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.

Total hack.

Link to comment
Share on other sites

  • 6 months later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

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?

Link to comment
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.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 1 year later...

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# ?

HellRiverSig3_stretch.png
Link to comment
Share on other sites

I haven't got Professional - just surmising that that would be the correct location ;)

Link to comment
Share on other sites

  • 2 weeks later...

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:

Link to comment
Share on other sites

  • 1 year later...

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?

Link to comment
Share on other sites

Not as far as I've found.

I've made this recommendation in the past (http://forums.getpaint.net/index.php?/topic/24740-problem-with-loading-custom-effects-to-paintnet-on-windows-7/#entry372860)

No one has complained :)

  • Upvote 1
Link to comment
Share on other sites

  • 5 weeks later...

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?

Underconstruction. Allways.

Link to comment
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)

Link to comment
Share on other sites

This template is very advanced. If you wish to learn how to program your own effects I recommend CodeLab

Forum Admin @BoltBait maintains CodeLab and has extensive guides on his website www.BoltBait.com

Link to comment
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.

×
×
  • Create New...