null54 Posted October 12 Share Posted October 12 11 minutes ago, xrModder said: How to place a listbox and a checkbox on the same line? I don't think it is possible using IndirectUI. 1 Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
BoltBait Posted October 12 Share Posted October 12 @null54 is correct. Each control requires its own line. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
BoltBait Posted October 13 Share Posted October 13 CodeLab v6.10 Released This is only for Paint.NET 5.0.11+! Big update today... Changes: ▪ Ability to configure color context to use WorkingSpace @Rick Brewster ▪ Only one menu entry now (configure Render Options on the configuration screen) @toe_head2001 ▪ Improvements to autocomplete @toe_head2001 ▪ New UI element Layer Chooser @BoltBait ▪ Templates now have links to tutorials @BoltBait ▪ Default effect type is now GPU Image effect @BoltBait ▪ Lots of bug fixes and small enhancements @toe_head2001 / @BoltBait / @Rick Brewster ALL NEW TUTORIALS: https://boltbait.com/pdn/CodeLab/help/tutorial/ @BoltBait Grab the CodeLab DLL here: https://www.boltbait.com/pdn/CodeLab/ Screenshots: Only one menu entry: New settings page to control how CodeLab is run: Notice that in the next screenshot, the Render Options are shown in parenthesis. New Layer Chooser UI Control: 2 1 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
AndrewDavid Posted October 15 Share Posted October 15 @BoltBait I don't think this was intentional. Nor this Spoiler Application version: paint.net 5.0.11 (Stable 5.11.8685.3093) Time of crash: 10/15/2023 12:39:40 PM Application uptime: 00:11:44.0489858 Application state: Running Working set: 474,424 KiB Handles and threads: 1524 handles, 60 threads, 273 gdi, 214 user Install type: Classic Application directory: C:\Program Files\paint.net Current directory: C:\Program Files\paint.net Install directory: C:\Program Files\paint.net OS Version: Windows 10 Home 10.0.19045.0 x64 .NET version: .NET 7.0.12 x64 Processor: "Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz" @ ~3193MHz (4C/4T, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2) Memory: 8,143 MB physical (1,927 MB free), 133,947,456 MB virtual free, 18,987 MB pagefile (8,175 MB free) Video card: NVIDIA GeForce GT 720 (fl:11.0, v:10DE, d:1286, r:A1), Microsoft Basic Render Driver (fl:12.1, v:1414, d:8C, r:0) Hardware acceleration: True (default: True) (rendering: 🚀 Performance (NVIDIA GeForce GT 720)) Remote session: no Pointers: none UI animations: True UI DPI: 96 dpi (1.00x scale) UI theme: VisualStyleCategory=Aero, EffectiveTheme=Aero, DWM=yes, AeroColorScheme=Dark, ThemeFileName=Aero.msstyles Updates: True, 10/15/2023 Locale: pdnr.c: en-US, hklm: en-US, hkcu: en-US, cc: en-US, cuic: en-US Flags: Exception details: System.TypeInitializationException: The type initializer for 'PdnCodeLab.Intelli' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. File name: 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null' at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctorWithParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes) at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) at PdnCodeLab.Intelli.<>c__DisplayClass66_0.<.cctor>b__1(Assembly a) at System.Linq.Enumerable.WhereArrayIterator`1.ToArray() at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items) at PdnCodeLab.Intelli..cctor() --- End of inner exception stack trace --- at PdnCodeLab.CodeTextBox.ParseVariables(Int32 position, Boolean localOnly) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) If I had received a notification when you posted it - You would have had this sooner. The issue was caused when I ran Codelab a second time. Hope this helps Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 15 Share Posted October 15 30 minutes ago, AndrewDavid said: System.TypeInitializationException: The type initializer for 'PdnCodeLab.Intelli' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.7.9, Version=0.7.9.1561, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. As mentioned to you before, this is a bug with the Plugin Browser. I'll try to release a bugfix release later today. Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
AndrewDavid Posted October 15 Share Posted October 15 I just discovered those two files were in a separate directory. If after running Plugin browser and then going into Codelab is the bug, then OK. I have never had a problem with the plugin browser itself. Maybe I don't use it enough to cause a crash but I do use it to ensure builds reflect the proper information. Quote Link to comment Share on other sites More sharing options...
xrModder Posted October 23 Share Posted October 23 How to get width and height of an image? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 23 Author Share Posted October 23 Just use Environment.Document.Size 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...
AndrewDavid Posted October 23 Share Posted October 23 It renders in preview just fine. Quote Link to comment Share on other sites More sharing options...
AndrewDavid Posted October 24 Share Posted October 24 I don't believe it. Now it works. After trying for hours to figure it out. I think the issue is what I had attached as a help file (RTF) 1 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 24 Share Posted October 24 21 minutes ago, AndrewDavid said: I think the issue is what I had attached as a help file (RTF) Yeah, that seems to be broken. Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
xrModder Posted October 25 Share Posted October 25 On 10/23/2023 at 10:40 PM, Rick Brewster said: Just use Environment.Document.Size How? I want to get the width and height of an image inside a loop: void Render(Surface dst, Surface src, Rectangle rect) { for (int y = rect.Top; y < rect.Bottom; y++) { if (IsCancelRequested) return; for (int x = rect.Left; x < rect.Right; x++) { ColorBgra srcPixel = src[x, y]; ColorBgra dstPixel = dst[x, y]; // Here dst[x,y] = CurrentPixel; } } } Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 25 Author Share Posted October 25 First, I recommend implementing a "Bitmap" Effect, not a "classic" Effect. You need the latest CodeLab for this. Then you'll have access to Environment.Document.Size, as well as all the other new stuff. The classic effect system is going to be deprecated soon (i.o.w. it'll be marked with [Obsolete] attributes, and you won't be able to compile for it), so there's no point in learning or using that system anymore. Bitmap Effect and GPU Image/Drawing Effect are the new replacements. 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...
toe_head2001 Posted November 7 Share Posted November 7 The next version of CodeLab will have improved Dark theming. i.e. More controls are now themed. 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
frio Posted November 9 Share Posted November 9 In my week of playing with CodeLab I've found the following issues (or I'm misunderstanding something): 1. Rich text help doesn't work on anything but classic plugins. Providing a rich text help and then trying to build gets you errors like this: Error at line -104: The type or namespace name 'SizeF' could not be found (are you missing a using directive or an assembly reference?) (CS0246) Error at line -100: The type or namespace name 'Size' could not be found (are you missing a using directive or an assembly reference?) (CS0246) Error at line -92: The name 'Icon' does not exist in the current context (CS0103) Error at line -92: The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an assembly reference?) (CS0246) Error at line -81: The type or namespace name 'Point' could not be found (are you missing a using directive or an assembly reference?) (CS0246) Error at line -70: The type or namespace name 'Font' could not be found (are you missing a using directive or an assembly reference?) (CS0246) My C# knowledge is limited, but that seems like it's not including some namespace it should be using? Works on a classic plugin. 2. Default values for many controls are acting weird: string and multiline string have no way of providing a default value, the value you put inside the definition seems to work if you read it but it's not visible on the UI. Reseed control accepts a default value, but it doesn't work on a compiled plugin, only inside CodeLab - it starts always at 0 as a standalone effect. 3. From what I understand adding a reseed button is supposed to add a Random into the class, but it's inaccessible: the RandomNumber member or its seeds are not visible to the script. 4. You're allowed to check the Straight alpha/Working space gamma build options for a non-GPU plugin, but if you do, it adds a malformed render info flags into the generated code and it won't compile. Maybe should be disabled, or at least not try to add non-existent flags? Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 9 Share Posted November 9 1 hour ago, frio said: In my week of playing with CodeLab I've found the following issues Thanks for the bug reports. I will address these in the next release of CodeLab. 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 9 Author Share Posted November 9 2 hours ago, frio said: My C# knowledge is limited, but that seems like it's not including some namespace it should be using? Probably System.Drawing, which generally should not be used in GPU or Bitmap effects. 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 November 9 Share Posted November 9 1 hour ago, Rick Brewster said: Probably System.Drawing, which generally should not be used in GPU or Bitmap effects. Yes, @toe_head2001 already checked in a fix for that issue. We just needed to specify the names because we removed System.Drawing from our using list for GPU effects. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Nerd-ish Posted November 12 Share Posted November 12 Hi there! Thank you all for CodeLab being an awesome "plugin". However, I couldn't find a way to use default/non-integrated adjustments and non-integrated effets. Is there any? Paint.NET 5.0.1.1 CodeLab 6.10 Quote Link to comment Share on other sites More sharing options...
BoltBait Posted November 12 Share Posted November 12 1 minute ago, Nerd-ish said: Hi there! Thank you all for CodeLab being an awesome "plugin". However, I couldn't find a way to use default/non-integrated adjustments and non-integrated effets. Is there any? What, EXACTLY, are you trying to use? Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free 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.