Jump to content

Need help "plugging in" a plugin


AnneYusual
Go to solution Solved by toe_head2001,

Recommended Posts


So I wanted to write a plugin for Paint.NET that generates a "scroll ornament" pattern (you know the branching spirals/swirls/curls thing, EVERYONE has seen at least one of them before). I really like the way they look, and drawing them by hand is a pain - they ought to make some pretty backgrounds if nothing else. Since I haven't done much with graphics before, and haven't used VisualStudio for a decade, I figured it would be easiest to first work out how to actually draw said "branching spirals" in a sandbox app, which I have. If anyone is curious the app (and source code) can be found at https://github.com/annayudovin/ScrollPatternGen/releases. It generates a dizzying (pardon the pun) variety of branching spirals, from small/simple ones to sprawling and complex ones. A couple of samples are attached, for any fellow scroll ornament fans out there.

 

If you like these, there's now a free app that will draw them for you. However, at the moment, the only integration with Paint.NET on offer is to copy the output to your clipboard and paste it into an open .pdn - and since it was meant to be a plugin (and get the user interface of one), the current user interface is made up of the stock Microsoft controls, and quite clunky.


I'm thoroughly stuck with what seems like an absurd problem. I CAN NOT get ANYTHING to run through VisualStudio as a Paint.NET plugin. The most "success" I've gotten so far was to have a CodeLab-generated VS solution of one of the sample effects to build/execute, except that the "execution" stage simply brings up Paint.NET - no plugins activated, no evidence of the "test" plugin in the Effects menu, just a Paint.NET instance running with a new file in it. Yes, the sample plugin I was using had a user interface - the one with the three sliders. While trying to run it through CodeLab, that actually showed up, but not through VS. I tried setting breakpoints in the code, but they aren't being reached - there's even the little exclamation mark warning on them to that effect at runtime. Modifying the solution/project to a Debug configuration didn't change a thing, either.


Apparently I didn't know how good I had it, because various efforts to update Paint.NET to the latest version, update my VS to the latest version (even though I'd only installed the thing in June), downloading the PDN template projects and trying those out, downloading some (older, unfortunately) plugins w/their own project files from github (toe_head's isometric cuboid seemed particularly appropriate, given what I *think* it does) and trying to get those to compile/and run, etc, have only made things worse - nevermind dropping off the face of the Earth as soon as Paint.NET loads, I can't even get any of these to build at all!
Just as soon as I get the compiler to stop complaining about all the missing references by referencing a laundry-list of DLLs from Paint.NET installation directories, and hit Build, I get a few of these beauties:


"Error    CS1705    Assembly 'PaintDotNet.Effects.Core' with identity 'PaintDotNet.Effects.Core, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null' uses 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'"


Why am I messing with all this instead of just using CodeLab? Well, I can't seem to figure out how to reference any objects CodeLab doesn't already know about. It makes of the "using" directives invisible (along with a bunch of auto-generated code), and C# insists on having all of those go BEFORE any other code, so, since there's already a bunch of it generated for me, even if I can't see it, adding another reference only creates errors. Actually, I haven't even figured out a way of getting to *see* all of that auto-hidden code except by pretending I'm going to generate a DLL and clicking the "View Source" button at the bottom of that screen. Unfortunately, if pasted back into CodeLab (or even saved to a file and opened in CodeLab), all of this extra code makes the compiler go wild with errors - I can only assume it's now popping up inside another invisible version of the same code, which is bound to be a problem.


I suppose I haven't tried simply pasting all the classes I'm trying to access into CodeLab, but I have a sinking suspicion it's going to find something unpalatable in the extra 4K lines of code. In any case, I kind of feel like this shouldn't be the only available option - I may actually want to step it through the debugger before it's all done and dusted. Sure, the class library is working inside its own little app, but it was supposed to work in Paint.NET, and never has, before.


If anyone wants to hold my hand through creating a VS project that actually builds AND pops up a plugin dialog in Paint.NET, I would be overjoyed. I'll be just as happy to be "gifted" with a copy of one to download. Either way, I'm all out of ideas for what to do at this point.

 

small_sample_scroll.png

sample_scroll.png

  • Like 2
  • Upvote 2
Link to comment
Share on other sites

That is so pretty @AnneYusual  If a plugin could be made, I'd use it!  I was messing with code a few years ago to learn. Now, it seems way beyond me because I didn't keep up with it. 🙂

Link to comment
Share on other sites

Such a pretty pattern @AnneYusual and I hope you get the code sorted out.  @BoltBait @toe_head2001 and @Ego Eram Reputo to name a few are bound to be able to help you :) 

30b8T8B.gif

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

Well, I'm happy to see other scroll fans out there! I've been wanting one of these for ages, and finally got around to just making one. But seriously, if you like the images, go download the app at https://github.com/annayudovin/ScrollPatternGen/releases - I promise, despite the clunky interface it will cause you no pain whatsoever, either installing it or running it. The colors of both the ornament and the background can be changed, and, as a free bonus (just kidding, it's all free), you get to save your favorites to a .svg (vector image), not just copy them to clipboard. Even if I never get it properly "plugged in", you could still have a lot of scroll ornaments for your drawing/decorating pleasure. Here's a screenshot of the standalone:

 

 

screenshot.png

Link to comment
Share on other sites

17 hours ago, AnneYusual said:

"Error    CS1705    Assembly 'PaintDotNet.Effects.Core' with identity 'PaintDotNet.Effects.Core, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null' uses 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'"

 

It sounds like you haven't updated your project to reference .NET 7 instead of .NET Framework 4.x

 

Did yo look at the sample effects for PDN v5? It will show you how to set up your csproj 

 

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

Hello @AnneYusual

 

Welcome to the forum :)

 

Over the course of 6 years, I believe I have followed your path on my own as well. I feel your frustration tenfold.

Not often does Windows\Paint.Net\Visual Studio work well together but they can if you gain a little more understanding of the NET framework.

Rest assured you are hearing this from a layman that has a working understanding of the process of creating a plugin in Codelab - exporting to VS - Building a working plugin.

The route I see you followed is just building it in VS and creating a standalone application that works fairly well, but with all the new updates, I think it has lost some of its functionality. I downloaded and installed your app, created a random pattern, hit SVG but nothing happened, hit copy which did paste it to the clipboard.

 

From Paint I was able to save as a svg and create a shape based on the generated image. So trying to save as svg in your app may not work for everyone.

 

I was able to view your source code in Visual Studio Code (A must have) and noticed you chose a form based interface. The most difficult in my opinion from what I have seen. There are only a few plugins around that still working, but their time is limited Im sure.

 

The best place to start (from a plugin creation view) is with codelab. @BoltBait has done an excellent job providing the basic guidance through a series of tutorials on his website https://www.boltbait.com/pdn/CodeLab/

I just saw @Rick Brewster has something to say.

 

Continued - I just looked at you app in VS 2022. You have built it directly on the Net framework. Think of Paint as a interface with the Net framework.

Most of the terminology in your app is directly accessing the net framework without using any language Paint.Net understands.

 

My next step is to build something in codelab to get you started.

 

 

Edited by AndrewDavid
added continue comments / changed link

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

2 hours ago, AndrewDavid said:

My next step is to build something in codelab to get you started.

 

ScrollGenerator.zip

Place the 3 Files in a directory and open the .cs file in Codelab. Make a Folder for your plugin. Select File/Build and you will see the option to generate a VS solution. Select the folder you just created. Notice the pngs have been automatically added.  Next step is open VS as administrator and open the generated ScrollGeneratorEffect.sln file. Look at the reference assemblies and see the difference to your Scroll Generator.exe  App

  • Hugs 1

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

Hi AndrewDavid!

 

Thank you for taking a look! You are right, I'm not very familiar with .NET - in fact, this was partly an exercise in *getting* familiar with it. Yes, I did choose a form based interface for my app -- I did try to guess what Paint.NET was using, but since I'm NOT familiar with all the options the various versions of the framework offer, it was kinda pointless. In any case however, the one part of my app that really doesn't need to migrate IS the interface: it sucks, it's clunky (the "sliders" that CodeLab produces for your plugin are 10X better than the poor imitations of the same functionality I cobbled together). On the bright side, like 90% of the code in my MainForm.cs is about making all the controls work together and update the options that make the SpiralTree generate a particular design. It mainly exists for my testing convenience, and can be ditched without any regrets.

 

The classes that DO need to be imported into Paint.NET are all the rest: SpiralTree, SpiralNode, Trig, Polygon and Configs. Once SpiralTree (the big boss) gets "grown", it will helpfully plot itself into a bunch of points and return those from scrollTree.PlotSpiralTreePoints(). From there, the points get handed over to the Graphics class which will draw them on a surface and join them with curves (good thing, too, because I have no idea how to do that). If I recall correctly, Graphics lives in using System.Drawing.Drawing2D, and I KNOW I've seen Paint.NET referencing that, so that part should NOT be a problem. All I really need to do is get SpiralTree to introduce itself to Paint.NET and it ought to take care of itself from there. Unfortunately, I can't figure out a way to do that from CodeLab - if I had, this would be a plugin already.

 

It's also in charge of logging itself (which I thought was funny, for a tree, but, in all seriousness, that bit is disabled by default, and won't be interfering with anything Paint does) and even saving (those same points) as an .svg. The latter wasn't really meant to go into Paint.NET - I was just temporarily frustrated with trying to get Graphics to give me a reference to the image it was plotting everything into, so I could put it on the clipboard. While I was cursing at it, it occurred to me to see what the vector format was all about, and I was surprised to learn that it was all XML, and that the same set of points I was handing over to Graphics can be, with a little formatting, saved into a conveniently resizable format. Oh, btw, before I forget to explain: when you click the .SVG button, nothing actually "happens" from your perspective. If, however, ScrollGenApp can locate your "Documents" directory and get write access to it, it will create a "ScrollGenerator" directory, and save the current design in there as scroll-date-and-time.svg. You may want to check - if you liked that scroll, and nothing unexpected happened, it's probably sitting there.

 

Actually, I did (on my first try, before I lost hope and started trying to get anything at all to show up in Paint) produce a "sketch" of what the plugin interface would have to do to make the tree hand over its points and plot them, and, in a separate try, took a crack at making controls for the relevant tree parameters from those on offer from CodeLab. The controls ended up being this set, which, I think ought to do quite nicely:

 

trkMaxNodes = token.GetProperty<Int32Property>(PropertyNames.TrkMaxNodes).Value;
chkRandNum = token.GetProperty<BooleanProperty>(PropertyNames.ChkRandNum).Value;
drpLeafNum = (byte)(int)token.GetProperty<StaticListChoiceProperty>(PropertyNames.DrpLeafNum).Value;
chkGrad = token.GetProperty<BooleanProperty>(PropertyNames.ChkGrad).Value;
optLeafSize = (byte)(int)token.GetProperty<StaticListChoiceProperty>(PropertyNames.OptLeafSize).Value;
optRandLrgSz = (byte)(int)token.GetProperty<StaticListChoiceProperty>(PropertyNames.OptRandLrgSz).Value;
optStyle = (byte)(int)token.GetProperty<StaticListChoiceProperty>(PropertyNames.OptStyle).Value;
chkTwin = token.GetProperty<BooleanProperty>(PropertyNames.ChkTwin).Value;
chkRandAng = token.GetProperty<BooleanProperty>(PropertyNames.ChkRandAng).Value;
originAngle = token.GetProperty<DoubleProperty>(PropertyNames.OriginAngle).Value;
chkResprout = token.GetProperty<BooleanProperty>(PropertyNames.ChkResprout).Value;
resproutAngle = token.GetProperty<DoubleProperty>(PropertyNames.ResproutAngle).Value;
trkShiftFactor = token.GetProperty<Int32Property>(PropertyNames.TrkShiftFactor).Value;
trkSpreadFactor = token.GetProperty<Int32Property>(PropertyNames.TrkSpreadFactor).Value;
scrollColor = ColorBgra.FromUInt32(unchecked((uint)token.GetProperty<Int32Property>(PropertyNames.ScrollColor).Value));
backgroundColor = ColorBgra.FromUInt32(unchecked((uint)token.GetProperty<Int32Property>(PropertyNames.BackgroundColor).Value));
btnPreview = (byte)token.GetProperty<Int32Property>(PropertyNames.BtnPreview).Value;
randomSeed = btnPreview;

 

 

Aside from those, just about the only code that would need to go into the plugin itself is this:

Surface aux = null;
private SpiralTree scrollTree;
private List<PointF[]> cachedTreePoints = new();
private Polygon Boundry;
private Color drawColor = Color.Black;
private Color bkgColor = Color.White;
private Graphics plotter;

protected override void OnDispose(bool disposing)
{
    if (disposing)
    {
        // Release any surfaces or effects you've created
        aux?.Dispose(); aux = null;
    }

    base.OnDispose(disposing);
}

// This single-threaded function is called after the UI changes and before the Render function is called
// The purpose is to prepare anything you'll need in the Render function
void PreRender(Surface dst, Surface src)
{
    if (aux == null)
    {
        aux = new Surface(src.Size);
    }

    plotter = Graphics.FromImage(aux.CreateAliasedBitmap());
    CreateTree();
}

private void CreateTree()
{
    float ht = aux.Size.Height;
    float wd = aux.Size.Width;
    float[][] coordArry = new float[4][] { new float[2] { 0f, 0f },
                                           new float[2] { 0f, ht },
                                           new float[2] { wd, ht },
                                           new float[2] { wd, 0f } };

    Boundry = new Polygon(coordArry, true);
    scrollTree = new SpiralTree(Boundry);

    //set Configs values from interface
    Configs.maxNodes = trkMaxNodes;
    Configs.maxLeaves = drpLeafNum;
    Configs.RANDNUM = chkRandNum;

    Configs.GRAD = chkGrad;
    Configs.SMTOLG = optLeafSize != 0;
    Configs.DIVOPTION = optStyle + 1;
    Configs.RANDLRG = (optRandLrgSz == 1 || optRandLrgSz == 2) ? true : false;
    Configs.RANDSZ = (optRandLrgSz == 2) ? true : false;

    Configs.TWIN = chkTwin;
    Configs.RANDANG = chkRandAng;
    Configs.rootAngle = (float)(originAngle * Math.PI) / 180f;

    Configs.GROWTINY = chkResprout;
    Configs.sproutAdjustment = (float)(resproutAngle * Math.PI) / 180f;

    Configs.spreadFactor = trkSpreadFactor * Configs.nodeHalo / 2f;
    Configs.shiftFactor = trkShiftFactor / 100f;

    scrollTree.Grow();
    cachedTreePoints = scrollTree.PlotSpiralTreePoints();
}


// Here is the main multi-threaded render function
// The dst canvas is broken up into rectangles and
// your job is to write to each pixel of that rectangle
void Render(Surface dst, Surface src, Rectangle rect)
{
    drawColor = EnvironmentParameters.PrimaryColor;
    bkgColor = EnvironmentParameters.SecondaryColor;

    plotter.Clear(bkgColor);
    float penWidth = 1.7f;
    //int BrushWidth = (int)EnvironmentParameters.BrushWidth;

    Pen pen = new(drawColor, penWidth);
    foreach (PointF[] _pArry in cachedTreePoints)
    {
        plotter.DrawCurve(pen, _pArry);
    }

    // Step through each row of the current rectangle
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        if (IsCancelRequested) return;
        // Step through each pixel on the current row of the rectangle
        for (int x = rect.Left; x < rect.Right; x++)
        {
            dst[x,y] = aux[x, y];
        }
    }
}


Again, I couldn't get anything to RUN, so I can't tell if it actually does the job, but if it doesn't, it ought to, with some minor modifications. The only hitch to making THAT work in code lab is the "using BFSSpiralTree;" directive, which immediately stops anything from compiling. I'm hardly a C# expert, so I don't know of any other way of making CodeLab aware of the existence of my classes. I tried sneaking them in as partial classes - but it balked as soon as I tried adding a method call, because that wasn't in its context. So, back to square one. If you know of a way to get it to work without a "using" directive, please enlighten me - I spent several hours reading C# docs yesterday in search of some alternative, and, although did I learn a few interesting things I didn't know before, I'm no closer to an answer.

Edited by AnneYusual
Link to comment
Share on other sites

Can you please put your code into a code block? It's really hard to read if it you just dump it into your reply as regular text.

 

Look for the <> button in the same row as bold, italics, etc. 

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

20 minutes ago, AndrewDavid said:

 

ScrollGenerator.zip 40.79 kB · 0 downloads

Place the 3 Files in a directory and open the .cs file in Codelab. Make a Folder for your plugin. Select File/Build and you will see the option to generate a VS solution. Select the folder you just created. Notice the pngs have been automatically added.  Next step is open VS as administrator and open the generated ScrollGeneratorEffect.sln file. Look at the reference assemblies and see the difference to your Scroll Generator.exe  App

 

OMG, THANK YOU, I'm gonna go try that now

Link to comment
Share on other sites

2 minutes ago, Rick Brewster said:

Can you please put your code into a code block? It's really hard to read if it you just dump it into your reply as regular text.

 

Look for the <> button in the same row as bold, italics, etc. 

 

Sorry, just realized how godawful it looked and edited 🫢

  • Upvote 1
Link to comment
Share on other sites

3 hours ago, Rick Brewster said:

 

It sounds like you haven't updated your project to reference .NET 7 instead of .NET Framework 4.x

 

Did yo look at the sample effects for PDN v5? It will show you how to set up your csproj 

 

I didn't watch the video -- didn't realize there was a video. I did download the templates from github and used them to create a project. I even suspected that the error was about .NET 7 - so I downloaded and installed that and updated VS. However, when I  tried to change the target framework, .NET 7 was still not showing up. I even tried to sneak it in by removing all the System references and referencing the relevant .NET DLLs  from Paint.NET installation directory, but VS wasn't having it. I'll give it another shot in a minute, maybe it's in a better mood today. I'm about to try out AndrewDavid's recipe - but I suspect it's only going to work if VS decides to *see* the .NET 7 framework that I've already installed. So, fingers crossed!

Link to comment
Share on other sites

Quote

I didn't watch the video -- didn't realize there was a video.

 

Video? I don't know what you're referring to

 

You'll want to use Visual Studio 2022 Community Edition. You won't need to install anything related to .NET 7 yourself -- Visual Studio will handle all of that.

 

Your csproj itself will only need references to the PaintDotNet DLLs, and for any NuGet packages you use. System assemblies no longer need explicit references, and will actually cause errors.

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 hour ago, AndrewDavid said:

 

ScrollGenerator.zip 40.79 kB · 1 download

Place the 3 Files in a directory and open the .cs file in Codelab. Make a Folder for your plugin. Select File/Build and you will see the option to generate a VS solution. Select the folder you just created. Notice the pngs have been automatically added.  Next step is open VS as administrator and open the generated ScrollGeneratorEffect.sln file. Look at the reference assemblies and see the difference to your Scroll Generator.exe  App

Ugh, sorry, no joy - I repeated the steps, and all went well, except that when I clicked run/debug Paint.NET showed up with a new document but no plugin "activated". Am I supposed to open it in CodeLab from there? Is that the missing action? Or was running VS as an admin supposed to make it come up?

I mean, on the bright side, everything compiles - but I can't get a plugin to pop up the same way as it would pop up a test one in CodeLab when you hit run - that shows the user interface (and if there's anything functional, it actually makes a preview in the open document).

Link to comment
Share on other sites

4 minutes ago, AnneYusual said:

when I clicked run/debug Paint.NET showed up with a new document but no plugin "activated"

 

If your plugin isn't listed in the Effects menu, then you need to ensure was copied into the Effects directory.

You can also look at "Plugin Errors" in the Paint.NET Settings.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

42 minutes ago, Rick Brewster said:

 

Video? I don't know what you're referring to

 

You'll want to use Visual Studio 2022 Community Edition. You won't need to install anything related to .NET 7 yourself -- Visual Studio will handle all of that.

 

Your csproj itself will only need references to the PaintDotNet DLLs, and for any NuGet packages you use. System assemblies no longer need explicit references, and will actually cause errors.

Derp, my bad, I misinterpreted the screenshot (that has a trackbar on it) in combination with the words " It will show you how to set up your csproj" - and thought you'd made a video tutorial to go with the project templates - which I *didn't* watch (good thing too - since it doesn't actually exist).

 

In any case, I did get the templates and used them. Actually I just double checked, because I was starting to think I was seeing things, but no, I'm not, and I have the screenshots to prove it! So, as I mentioned, I've created a bunch of test solutions with sample code just to get anything to run in VS and show up in Paint.NET. I've also deleted a bunch of them, because they were multiplying. But two of them are still sitting around in their respective directories. I know one was generated through CodeLab, and the other by using the project templates, but unfortunately, I can't remember which is which. I just opened each one in VS, and looked at the solution properties. Here are the screenshots:

 

Apparently, ONE of them can see .NET 7.0, but not the other one...

 

Btw, I did download/install .NET 7 by selecting that "install other frameworks" option, which sends you to a website to download other versions. It was an .exe, it ran and installed itself with no incident, but STILL wouldn't show up in that dropdown. I updated VS after that, hoping that would make it show up, but no, it didn't. Apparently it still doesn't show up for THAT solution, but it's available on another, and I actually have no idea what the difference is (or why the solution properties interface looks slightly different on them).

NET4screen_shot.png

NET7screen_shot.png

Link to comment
Share on other sites

2 minutes ago, AnneYusual said:

I know one was generated through CodeLab, and the other by using the project templates

 

Project templates? I hope you're not referring to the ones I created many years ago. They are extremely outdated, and aren't even available anymore.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

13 minutes ago, Rick Brewster said:

There's no way to launch PDN and have it activate a plugin. I'm not sure your expectations are correct

 

12 minutes ago, toe_head2001 said:

 

If your plugin isn't listed in the Effects menu, then you need to ensure was copied into the Effects directory.

You can also look at "Plugin Errors" in the Paint.NET Settings.

 

Ok, now we are getting somewhere. So, I don't actually know what I should be expecting - I've never written a plugin before. I tried creating a sample one in CodeLab - and when you click "run" in CodeLab, it shows the plugin "activated" with the user interface. Conversely, when I code something in VS, and hit "run/debug", it's going to run my code, whether as an app or in a console. I can also set breakpoints in my code and the execution will get to that point and pause there. It seemed reasonable that when attempting to "run" a plugin in VS, it might have to activate Paint.NET as the "parent" app, but then would actually, you know, RUN MY CODE. Apparently an incorrect assumption on my part...

 

So, what exactly do I need to do to run my code? Do some/all of the build files go into Paint.NET's regular plugins directory, the same way as "production" plugins and then I activate them from the Paint.NET instance that VS triggers? If I set breakpoints, will they be reached that way?

Link to comment
Share on other sites

27 minutes ago, toe_head2001 said:

 

Project templates? I hope you're not referring to the ones I created many years ago. They are extremely outdated, and aren't even available anymore.

I don't believe so... Just checked my downloads, seems I have a pdn-project-templates-for-vs-master.zip and a PdnV5EffectSamples-main.zip. Is it the pdn-project-templates-for-vs-master? Was I confusing one for the other?  It seems the biggest problem at this point was that I was expecting something to happen that wasn't *going to* happen, and when it didn't - I assumed something wasn't working right. No wonder nothing I tried worked - it tends not to, when one is barking up the wrong tree. 🫣 🤓

Edited by AnneYusual
Link to comment
Share on other sites

  • Solution
7 minutes ago, AnneYusual said:

Is it the pdn-project-templates-for-vs-master?

 

That filename sounds like it would be the VSIX source code for my templates. Which will be of no use to you.

 

22 minutes ago, AnneYusual said:

So, what exactly do I need to do to run my code?

 

Once your plugin is compiled, ensure the DLL file has been copied into the Effects directory of Paint.NET.

Then you can start Paint.NET with the Visual Studio debugger.

Proceed to open your plugin from the Effects menu within Paint.NET.

When your plugin is run, your breakpoints in Visual Studio will break. (assuming the code path is executed)

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

18 minutes ago, AndrewDavid said:

If the solution is built by codelab, is this a necessary step?

 

I don't really understand your question.

I gave the steps for what AnneYusual is trying to achieve.

The steps have nothing to do with working in CodeLab.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

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...