Jump to content

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


Recommended Posts

Now that looks cool! Nice job t_h. CodeLab is becoming more and more sophisticated. Like its all grown up, *sniff* our little editor is a big boy now :mrgreen:

Link to post
Share on other sites

Sweet! I've been missing auto indent now that I'm using VS a great deal more.

Link to post
Share on other sites
  • 2 weeks later...

CodeLab 3.0 Released

This is only for Paint.NET 4.0.20+!

 

HUGE update today...

 

Editor Changes:

▪ PDN Dark Theme compatibility (toe_head2001)
▪ New 'Find & Replace' panel with expanded functionality (toe_head2001)
▪ Edit -> Format Document. Automatic line indentation, and whitespace trimming from line ends (toe_head2001)
▪ F12 to 'Go To Definition'. Objects from the .Net Framework open docs.microsoft.com; objects from UserScript go to location in document (toe_head2001)
▪ Proper "Intelligent Assistance" for User Defined type members (fields, methods, ect. in your script), and type members defined in the Effect class (EnvironmentParameters, IsCancelRequested, ect.) (toe_head2001)
▪ Autocomplete box can now be filtered object type (Class, Property, Keyword, ect.) (toe_head2001)

▪ Bug fix: Red underlines for errors are now correctly located (toe_head2001)
 

Code Generation Changes:

▪ Int and Double sliders can now have decorations (BoltBait)
▪ Users can have controls disabled based on the status of other controls (enable/disable checkbox, etc.) (BoltBait)
▪ OnSetRenderInfo can be optionally utilized in the UserScript via the PreRender method. (toe_head2001)
▪ All File > New templates rewritten to utilize the new PreRender() function (BoltBait)
▪ Bug fix: Radio buttons and Drop-down lists now properly set default values (toe_head2001)

 

 

Grab the CodeLab DLL here:

http://www.boltbait.com/pdn/CodeLab/

 

 

Big shout-out to @MJW for helping design and test all the new features!

 

CodeLabRules.png

 

 

  • Like 3
  • Upvote 2

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites
  • BoltBait changed the title to CodeLab v3.0 (for advanced users) Released January 10, 2018

^^^ This is black magic! Pure witchcraft and wizardry!  :MagicWandTool:

Job well done! Those guys are awesome!   *tuts his own horn, and breaks his arm off patting himself on the back*  :lol:

Do we even need Visual Studio anymore? :P

 

 

Nearly 12 years ago, it was written:

Quote

Please note that this ... is not meant to provide a robust development environment.

 

I think it's safe to say that we now have the most robust development environment of any image manipulation program. :trophy:

 

11 hours ago, BoltBait said:

Autocomplete box can now be filtered object type (Class, Property, Keyword, ect.)

Here are the keyboard commands to invoke filtering within the AutoComplete box:

Alt+L    Local Variables and Parameters

Alt+O    Constants

Alt+P    Properties

Alt+F    Fields

Alt+M    Methods

Alt+C    Classes

Alt+S    Structs

Alt+E    Enums

Alt+K    Keywords

 

 

Enjoy the new features and bugfixes.

  • Like 2
  • Upvote 2
Link to post
Share on other sites
1 minute ago, xod said:

Do you think it's possible to add a Classic Color control (existing in Windows) other than the pdn Color Wheel?
It would take up much less space in the UI.

 

CodeLab only supports IndirectUI controls built-in to paint.net itself.

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to post
Share on other sites

@BoltBait, @toe_head2001 & @MJW - you guys rock! Thank you for these wonderful tools.

Link to post
Share on other sites

Question from a total noob...

 

Is there a way to quickly preview the dialog without having to publish, move the effect to appropriate location, and run PDN to see if it works?  Or is this more for Visual Studio where the ability to use XML editor to customize the location of each interactive feature?

 

Thanks.

Link to post
Share on other sites
4 hours ago, xod said:

Some comments on formatting:
- if the comment ends in a bracket, below statement is wrongly indented
- also for more 'using' statements

Thanks for the report. I'll get these fixed. I suspect there more small issues with it, yet to be discovered.

Once we make "bug free", I'd like to automatically execute the 'Format Document' feature.  For example, when you paste in code, 'Format Document' would just automatically run on that pasted code.

 

1 hour ago, TrevorOutlaw said:

Is there a way to quickly preview the dialog without having to publish, move the effect to appropriate location, and run PDN to see if it works? 

No there is not. Previewing the dialog from CodeLab would technically be possible, but that's very low on my list of priorities.

 

1 hour ago, TrevorOutlaw said:

Or is this more for Visual Studio where the ability to use XML editor to customize the location of each interactive feature?

When you derive from PropertyBasedEffect, you can't customize the dialog extensively. You literally declare a short list of properties, and paint.net generates a dialog at runtime based on those properties (this is colloquially  know as "IndirectUI").

 

If you need a fully custom dialog, you have to tediously build it from scratch with WinForms controls.

Link to post
Share on other sites

Can such object operations be defined, which let to change all of the channels together such these codes can to changed together as Instead of this

 

CurrentPixel.R = PrimaryColor.R + 25;
CurrentPixel.G = PrimaryColor.G + 25;
CurrentPixel.B = PrimaryColor.B + 25;
CurrentPixel.A = PrimaryColor.A + 25;

we can simply use.

CurrentPixel = PrimaryColor + 25;

 

Rl7un0O.png

Link to post
Share on other sites
14 hours ago, Pratyush said:

Can such object operations be defined, which let to change all of the channels together such these codes can to changed together as Instead of this

 

You could create a function for that.

void Render(Surface dst, Surface src, Rectangle rect)
{
    ColorBgra PrimaryColorColor = EnvironmentParameters.PrimaryColor;

    ColorBgra CurrentPixel;
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        if (IsCancelRequested) return;
        for (int x = rect.Left; x < rect.Right; x++)
        {
            CurrentPixel = IncrementAllChannels(PrimaryColorColor, 25);
            
            dst[x,y] = CurrentPixel;
        }
    }
}

ColorBgra IncrementAllChannels(ColorBgra color, int amount)
{
    return ColorBgra.FromBgraClamped(color.B + amount, color.G + amount, color.B + amount, color.A + amount);
}

 

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