Jump to content

CodeLab v6.0 (for advanced users) Released June 25, 2020


Recommended Posts

  • 4 weeks later...

I'm using CodeLab with Paint.NET 3.5 Beta 1 on Windows Vista 64-bit.

I am encountering a problem after adding a 'Drop-Down List Box' or a 'Radio Button List'.

When I select 'File | Save as DLL ...' and then click 'Build', I get the following error message:

'PaintDotNet.Utility.ClampToByte(int)' is obsolete: 'Use the ClampToByte() extension method instead' (CS0619).

This also happened with the Paint.NET 3.5 alpha builds.

Does anyone know of a workaround?

Link to post
Share on other sites
  • 1 month later...
Are there any plans for creating an intellisense-like menu for codelab?

I have no plans for it myself. But, 2 different people have approached me about adding it. Neither has caughed up any code though. So, if you want to tackle it... Go for it!

Download the source code from my site. If you get something working, send it to me and I'll put it into the official build.

Link to post
Share on other sites
  • 1 month later...

Hey Boltbait, would it be possible for you to add functionality to disable the constant 'running of the effect' while writing the code? It freezes up Paint.NET for about one or two seconds and when you are mid-line of code it can become quite the nuisance. Thanks, and a Merry Christmas!

- Mike

Link to post
Share on other sites

Recently a very simple thought stoke me - we can't use different layers in scripting, but we can use different parts of the image with rectangular selection. Here is example of using 3 "layers".

    int w=(selection.Right-selection.Left)/3;
   for (int y = rect.Top; y < rect.Bottom; y++)
   {
       for (int x = rect.Left; x < rect.Right; x++)
       {
           if (x=selection.Left+2*w)
           {
               continue;
           }
           //here we can change only middle part of the image using left and right "layer".
      }
   }
}

For non-rectangular selections offsets of "layers" have to be passed via parameters.

Link to post
Share on other sites
  • 2 weeks later...
OK, well in the mean time, just use Paint.NET 3.36 for plugin development.

In case it helps, here's a version of the excellent CodeLab plugin that I've updated to work with the latest version of Paint.NET (3.5.2 as of writing)...

I've just updated it to use the Int32Util.ClampToByte method for listboxes and radio boxes so now compiles plugins correctly again.

I.e. line 1337 and 1348 to read....

PropertyPart += "            this.Amount" + x.ToString() + " = Int32Util.ClampToByte((int)newToken.GetProperty(PropertyNames.Amount" + x.ToString() + ").Value);\r\n";

(Also upgraded to .NET 3.5 framework so it could be recompiled)

I have to admit, this CodeLab is fantastic! I'm having so much fun with it!

Link to post
Share on other sites

CodeLab has been updated.

Grab your copy here: http://www.boltbait.com/pdn/codelab/

- Added window title customization

- Script comment parsed for default window title:

// Title: Your window title here

- Fixed Radio Button List control type

Your effects can now have customized title bars. Enjoy.

BTW, this new build works with PdN 3.36+

Link to post
Share on other sites
I'm sorry if this question has already been answered, but,

Can you read RGBA values on other layers? How?

You can not. It is a limitation of the Paint.NET plugin system that you are limited to reading only pixels on the currently selected layer.

This may be fixed in a future version of Paint.NET, but don't hold your breath waiting for it.

Link to post
Share on other sites

Thanks for the quick reply, too bad.

Anyways, that leads to Sarkut's question.

Could a plugin use RGBA values on one other layer

if it is pre-loaded to the Windows clipboard?

I figure that is more likely, but...it all depends on how the program's clipboard is built (because codelab uses an include code for part of the code).

Link to post
Share on other sites
  • BoltBait changed the title to CodeLab v6.0 (for advanced users) Released June 25, 2020

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