BoltBait Posted August 24, 2009 Share Posted August 24, 2009 how did you guys learn how to do the scripting?? http://www.boltbait.com/pdn/codelab/help/ Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Frostyfrog Posted September 20, 2009 Share Posted September 20, 2009 Anyone know how to make the fractals? I just want a fractal example to help me to get started. (only for personal use plugins though) Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 20, 2009 Share Posted September 20, 2009 Here's a codelab source that might make a great fractal starting point: viewtopic.php?p=109686#p109686 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
DW-dev Posted September 22, 2009 Share Posted September 22, 2009 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? Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted September 22, 2009 Share Posted September 22, 2009 Try replacing Utility.ClampToByte(variable); with variable.ClampToByte(); Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 23, 2009 Author Share Posted September 23, 2009 You can also use Int32Util.ClampToByte(x). The Utility class is being deprecated. It will still be there for older plugins, but new code should never use it (when possible). Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
BoltBait Posted September 23, 2009 Share Posted September 23, 2009 If CodeLab is generating that code, I'll fix it later... before Paint.NET 3.5 is officially released. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
DW-dev Posted September 26, 2009 Share Posted September 26, 2009 Yes, it is CodeLab that is generating the code that causes the error: 'PaintDotNet.Utility.ClampToByte(int)' is obsolete: 'Use the ClampToByte() extension method instead' (CS0619). Quote Link to comment Share on other sites More sharing options...
BoltBait Posted September 26, 2009 Share Posted September 26, 2009 OK, well in the mean time, just use Paint.NET 3.36 for plugin development. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Boude Posted November 11, 2009 Share Posted November 11, 2009 Are there any plans for creating an intellisense-like menu for codelab? Quote History repeats itself, because nobody was paying attention the first time. Link to comment Share on other sites More sharing options...
BoltBait Posted November 11, 2009 Share Posted November 11, 2009 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. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Mike Ryan Posted December 24, 2009 Share Posted December 24, 2009 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 Quote Link to comment Share on other sites More sharing options...
pyrochild Posted December 24, 2009 Share Posted December 24, 2009 Just add a nonsense line somewhere in the code to prevent it from compiling, then remove it when you want to test. EDIT: I just use a '!' Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Mike Ryan Posted December 24, 2009 Share Posted December 24, 2009 Thanks, that works just fine Quote Link to comment Share on other sites More sharing options...
halyavin Posted December 30, 2009 Share Posted December 30, 2009 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. Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted December 30, 2009 Share Posted December 30, 2009 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". That's a limitation to Paint.NET's effects API, not CodeLab. Quote Link to comment Share on other sites More sharing options...
Arbruteblade Posted January 10, 2010 Share Posted January 10, 2010 Hi, I'm a total n00b and I'm having trouble getting a code to work right. Where do I go to ask someone what to do if I'm having trouble with a codelab code? Also, is there a library of different functions in codelab? Edit: nvm, most of the functions are in the source code. Quote Link to comment Share on other sites More sharing options...
sradforth Posted January 11, 2010 Share Posted January 11, 2010 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! Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 12, 2010 Share Posted January 12, 2010 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+ Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Boude Posted January 12, 2010 Share Posted January 12, 2010 Thank you. Quote History repeats itself, because nobody was paying attention the first time. Link to comment Share on other sites More sharing options...
Arbruteblade Posted January 15, 2010 Share Posted January 15, 2010 I'm sorry if this question has already been answered, but, Can you read RGBA values on other layers? How? Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 15, 2010 Share Posted January 15, 2010 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. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Sarkut Posted January 16, 2010 Share Posted January 16, 2010 Could a plugin use RGBA values on one other layer if it is pre-loaded to the Windows clipboard? Quote Link to comment Share on other sites More sharing options...
Arbruteblade Posted January 16, 2010 Share Posted January 16, 2010 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). Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 16, 2010 Share Posted January 16, 2010 Yes. Plugins can access an image on the clipboard. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Computer Dominos Game Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.