Jump to content


Photo

Problem with loading custom effects to Paint.NET on Windows 7


  • Please log in to reply
13 replies to this topic

#1 cheatmaster18

cheatmaster18
  • Newbies
  • 6 posts
  • LocationNorway
  • Reputation:0

Posted 11 May 2012 - 07:55 AM

When I create Plugin effects to Paint.NET on Windows 7 it would not load into Paint.NET, this not happen in Windows Vista when I create it there. I have tried every thing that I know but it still not work. What can I have did wrong or is it a bug in Paint.NET?

Edited by cheatmaster18, 11 May 2012 - 08:13 AM.


#2 Ego Eram Reputo

Ego Eram Reputo

    Master of Competition Ideas and 2012 Proton Award Winner

  • Moderators
  • 5,763 posts
  • LocationNorth Canterbury, New Zealand
  • Reputation:231

Posted 11 May 2012 - 10:35 AM

Are you unzipping the effect first?

Once unzipped, the files with the extension *.dll need to be moved to the Paint.NET/Effects/ folder (unless they are of the filetype nature, when they go in the Paint.NET/filetypes/ folder).

Restart Paint.NET once you have them moved into the correct location and you should be OK.

#3 jim100361

jim100361
  • Members
  • 849 posts
  • LocationMilton NH
  • Reputation:50

Posted 11 May 2012 - 11:16 AM

It is possible that he's encountering the files being blocked by Windows 7. I recall some time ago when I downloaded .zip files containing models (.mdl files) for a game I was involved in, I was having problems using them as Windows wouldn't permit it until I had the permissions adjusted for me. This could be occuring to him.

Now it's been quite awhile since I've had the problem because I disabled the UAC (User Access Control) on my computer. I believe if he checks the properties on the .zip file that contained the .dll and/or the .dll itself it should indicate, "This file came from another computer and might be blocked to help protect this computer." If this is the case, and if my memory is correct, he should be able unblock the files from the same properties dialogue box.
Posted Image

#4 cheatmaster18

cheatmaster18
  • Newbies
  • 6 posts
  • LocationNorway
  • Reputation:0

Posted 11 May 2012 - 01:55 PM

No i do not have the dll file in a zip file. I created the dll file by my self.

#5 Rick Brewster

Rick Brewster

    Paint.NET Author and Developer

  • Administrators
  • 12,611 posts
  • LocationKirkland, WA
  • Reputation:125

Posted 11 May 2012 - 05:31 PM

Moved to Plugin Development Center
The Paint.NET Blog: http://blog.getpaint.net/
Donations are always appreciated! http://www.getpaint.net/donate.html

Posted Image

#6 Ego Eram Reputo

Ego Eram Reputo

    Master of Competition Ideas and 2012 Proton Award Winner

  • Moderators
  • 5,763 posts
  • LocationNorth Canterbury, New Zealand
  • Reputation:231

Posted 12 May 2012 - 05:06 AM

@cheatmaster18: Are you using Codelab to build the effect or Visual Studio?

#7 cheatmaster18

cheatmaster18
  • Newbies
  • 6 posts
  • LocationNorway
  • Reputation:0

Posted 12 May 2012 - 10:02 AM

I am using Visual Studio, the language C#

#8 Ego Eram Reputo

Ego Eram Reputo

    Master of Competition Ideas and 2012 Proton Award Winner

  • Moderators
  • 5,763 posts
  • LocationNorth Canterbury, New Zealand
  • Reputation:231

Posted 13 May 2012 - 03:46 AM

I take it that you're compiling the code, but cannot get it to show up in Paint.NET?

The probable cause is that you have targeted .NET 4.0 when you need to target 3.5.

In Visual Studio with your project open, go to the Solution Explorer double click Properties > Application tab. Under the target Framework heading, choose .NET 3.5 from the dropdown list.

Save & rebuild.

(Note: you may be prompted to close & reopen the project. Do so.)

Please let me know if this fixes the problem.

#9 cheatmaster18

cheatmaster18
  • Newbies
  • 6 posts
  • LocationNorway
  • Reputation:0

Posted 13 May 2012 - 09:28 PM

I did what you say and it did not work and Paint.NET is not showing any errors with the plugins.

#10 Ego Eram Reputo

Ego Eram Reputo

    Master of Competition Ideas and 2012 Proton Award Winner

  • Moderators
  • 5,763 posts
  • LocationNorth Canterbury, New Zealand
  • Reputation:231

Posted 13 May 2012 - 10:06 PM

What is the effect you're trying to make? Would you be willing to post the source?

#11 cheatmaster18

cheatmaster18
  • Newbies
  • 6 posts
  • LocationNorway
  • Reputation:0

Posted 14 May 2012 - 05:42 AM

I am trying to create a effect that can invert colors with a slider to each color, but I will not post that part and I know I don't did anything wrong there, so I am posting the most important part of my script.

using System;
using System.Drawing;
using PaintDotNet;
using PaintDotNet.Effects;
namespace ModelEffect
{
	[EffectCategory(EffectCategory.Effect)]
	public class EffectPlugin : Effect
	{
		public EffectPlugin() : base("Invert Colors", null,"CustomEffects", EffectFlags.Configurable)
		{
	
		}
		public override void Render(EffectConfigToken parameters, PaintDotNet.RenderArgs dstArgs, PaintDotNet.RenderArgs srcArgs, System.Drawing.Rectangle[] rois, int startIndex, int length)
		{
			// My code is here
		}
		public override EffectConfigDialog CreateConfigDialog()
		{
			return new CreateEffectConfigDialog();
		}
	}
}

Edited by cheatmaster18, 14 May 2012 - 05:46 AM.


#12 Ego Eram Reputo

Ego Eram Reputo

    Master of Competition Ideas and 2012 Proton Award Winner

  • Moderators
  • 5,763 posts
  • LocationNorth Canterbury, New Zealand
  • Reputation:231

Posted 14 May 2012 - 10:06 PM

Um.... why not use codelab to get it working and then port it to Visual Studio?

I seem to recall BoltBait uses this development method. You can cut & paste the source from Codelab.


Have you followed these steps? http://forums.getpai...ate/#entry21968

#13 BoltBait

BoltBait
  • Administrators
  • 8,934 posts
  • LocationCalifornia, USA
  • Reputation:103

Posted 15 May 2012 - 03:58 AM

Unless you're using Clouds, random numbers, or custom controls, there is really no reason to code your plugin outside of CodeLab.

Download CodeLab here: http://boltbait.com/pdn/codelab/

Read the help file here: http://boltbait.com/pdn/codelab/help/ it includes LOTS of examples to get you started.
Click to play:
Posted ImagePosted ImagePosted ImagePosted ImagePosted Image
Download: BoltBait's Plugin Pack | CodeLab | More... and how about a Computer Dominos Game

#14 cheatmaster18

cheatmaster18
  • Newbies
  • 6 posts
  • LocationNorway
  • Reputation:0

Posted 15 May 2012 - 08:47 PM

Have you followed these steps? http://forums.getpai...ate/#entry21968


Thanks Ego Eram Reputo, the EffectPlugin-Template in the link you posted fixed the problem, now everything works again, I only had to do some modifications in the EffectPlugin-Template to do so it works correctly.
And thanks BoltBait, for the instructions that was in the link.

Edited by cheatmaster18, 15 May 2012 - 08:55 PM.