Asmageddon Prince Posted November 20, 2007 Share Posted November 20, 2007 Okay I made really great Plugin with great possibilities, very powerfull tool, but there are two problems.: 1)A bit too slow, need help with optimization. 2)Don`t have any tool, and don`t know how to create UI. So here is the code for CodeLab(Can be downloaded in Plugins section). Asmageddon_The best effect SourceCode.zip Quote The Asmageddon is coming. You better prepare... or you won`t survive Link to comment Share on other sites More sharing options...
I Like Pi Posted November 20, 2007 Share Posted November 20, 2007 CodeLab wasn't intended as a full development environment. You're better off downloading Visual C# Express and the effect plugin template. Then you can create a GUI using the forms designer or the new property system in 3.20 beta. You can look at 3.10's source code or decompile Paint.NET 3.20 using Reflector for coding examples. Quote Link to comment Share on other sites More sharing options...
Bob Posted November 20, 2007 Share Posted November 20, 2007 decompile Paint.NET 3.20 using Reflector for coding examples. Wait for the final release. Quote No. Way. I've just seen Bob. And... *poof!*—just like that—he disappears into the mist again. ~Helio Link to comment Share on other sites More sharing options...
jsonchiu Posted November 21, 2007 Share Posted November 21, 2007 Well, the current codelab let you create plugins with a few predefined UI. The other way is to get Visual C# Express, and use the package (see stickied threads) to create your plugin. Quote Some links: | Personal Website | Alien Attack | Try out my plugins: | Antialias | Diagonal Lines | Link to comment Share on other sites More sharing options...
MadJik Posted November 21, 2007 Share Posted November 21, 2007 I've changed some lines for optimisation... 1.Take src[x,y] in TEMP to extract RGBA, 1 pixel read instead 4... 2.If selection visible useless, as x,y are inside the selection... 3.Avoid same calculation in the loop, calculate it 1 time in a variable before the loop(s) : mPI = Math.PI /180.0; Do you want me to make a UI for that ? Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 21, 2007 Share Posted November 21, 2007 I definitely recommend writing for the IndirectUI system in 3.20. Targeting v3.10 and writing your own WinForms dialog with all the data binding and other requisite clumsiness is just a waste of time. I even plan on writing documentation for it! 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...
MadJik Posted November 21, 2007 Share Posted November 21, 2007 I definitely recommend writing for the IndirectUI system in 3.20. Targeting v3.10 and writing your own WinForms dialog with all the data binding and other requisite clumsiness is just a waste of time. I even plan on writing documentation for it! Of course I was thinking in this way...(at least not targeting past(soon) version). May I ask you? ...some help to implement the list of choice control that (you should know) I'm not able (yet) to make working correctly. ...if you have found/changed something about the set ragne proprieties for the sliders. (wounder if I could public link to beta center) And BTW the new IndirectUI will be a great help for this plugin with a hudge of parameters (at least to code), but I'm afraid that the size of the UI in the end will force me/us to write a visualy efficient UI form for the user... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MadJik Posted November 21, 2007 Share Posted November 21, 2007 Only 3/5 (about) of the UI is visible on a screen wide 1600x1200... visible: configUI.SetPropertyControlValue(PropertyNames.Mode, ControlInfoPropertyNames.DisplayName, "Choose the color mode"); configUI.SetPropertyControlValue(PropertyNames.Mode, ControlInfoPropertyNames.Description, "1:RGB grey, 2:RGB normal, 3:Prim.Sec.*RGB Grey, 4:Prim.Sec.*RGB normal, 5:Blur the image"); configUI.SetPropertyControlValue(PropertyNames.BlendMode, ControlInfoPropertyNames.DisplayName, "Choose the blend mode"); configUI.SetPropertyControlValue(PropertyNames.BlendMode, ControlInfoPropertyNames.Description, "1:Normal, 2:Additive, 3:Substraction, 4:Multiply, 5:Lighten, 6:Darken"); configUI.SetPropertyControlValue(PropertyNames.PercentRed, ControlInfoPropertyNames.DisplayName, "Color percentage"); configUI.SetPropertyControlValue(PropertyNames.PercentRed, ControlInfoPropertyNames.Description, "Red"); configUI.SetPropertyControlValue(PropertyNames.PercentGreen, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.PercentGreen, ControlInfoPropertyNames.Description, "Green"); configUI.SetPropertyControlValue(PropertyNames.PercentBlue, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.PercentBlue, ControlInfoPropertyNames.Description, "Blue"); configUI.SetPropertyControlValue(PropertyNames.IRed, ControlInfoPropertyNames.DisplayName, "Color include/exclude"); configUI.SetPropertyControlValue(PropertyNames.IRed, ControlInfoPropertyNames.Description, "Red"); configUI.SetPropertyControlValue(PropertyNames.IGreen, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.IGreen, ControlInfoPropertyNames.Description, "Green"); configUI.SetPropertyControlValue(PropertyNames.IBlue, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.IBlue, ControlInfoPropertyNames.Description, "Blue"); configUI.SetPropertyControlValue(PropertyNames.OpacityR, ControlInfoPropertyNames.DisplayName, "Color Opacity"); configUI.SetPropertyControlValue(PropertyNames.OpacityR, ControlInfoPropertyNames.Description, "Red"); configUI.SetPropertyControlValue(PropertyNames.OpacityG, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.OpacityG, ControlInfoPropertyNames.Description, "Green"); configUI.SetPropertyControlValue(PropertyNames.OpacityB, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.OpacityB, ControlInfoPropertyNames.Description, "Blue"); configUI.SetPropertyControlValue(PropertyNames.Lenght, ControlInfoPropertyNames.DisplayName, "Lenght"); configUI.SetPropertyControlValue(PropertyNames.Angle, ControlInfoPropertyNames.DisplayName, "Angle"); configUI.SetPropertyControlType(PropertyNames.Angle, PropertyControlType.AngleChooser); configUI.SetPropertyControlValue(PropertyNames.Intensity, ControlInfoPropertyNames.DisplayName, "Intensity"); configUI.SetPropertyControlValue(PropertyNames.SizeX, ControlInfoPropertyNames.DisplayName, "Height of matrix"); configUI.SetPropertyControlValue(PropertyNames.SizeY, ControlInfoPropertyNames.DisplayName, "Width of matrix"); invisible: configUI.SetPropertyControlValue(PropertyNames.SwapColors, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.SwapColors, ControlInfoPropertyNames.Description, "Swap P/S Colors"); configUI.SetPropertyControlValue(PropertyNames.InvertColors, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.InvertColors, ControlInfoPropertyNames.Description, "Invert Colors"); configUI.SetPropertyControlValue(PropertyNames.Vector, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.Vector, ControlInfoPropertyNames.Description, "Vector (use Angle Y/N)"); configUI.SetPropertyControlValue(PropertyNames.VectorOffset, ControlInfoPropertyNames.DisplayName, "VectorOffset"); configUI.SetPropertyControlType(PropertyNames.VectorOffset, PropertyControlType.AngleChooser); configUI.SetPropertyControlValue(PropertyNames.VectorAngle, ControlInfoPropertyNames.DisplayName, "Vector Angle"); configUI.SetPropertyControlValue(PropertyNames.Vector, ControlInfoPropertyNames.Description, "off:By angle offset, on:By angle+90 offset"); configUI.SetPropertyControlValue(PropertyNames.OffsetMode, ControlInfoPropertyNames.DisplayName, "Offset Mode"); configUI.SetPropertyControlValue(PropertyNames.OffsetMode, ControlInfoPropertyNames.Description, "off:Normal offset, on:Vector offset"); configUI.SetPropertyControlValue(PropertyNames.RandXoffset, ControlInfoPropertyNames.DisplayName, "Random offset"); configUI.SetPropertyControlValue(PropertyNames.RandXoffset, ControlInfoPropertyNames.Description, "X"); configUI.SetPropertyControlValue(PropertyNames.RandYoffset, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.RandYoffset, ControlInfoPropertyNames.Description, "Y"); configUI.SetPropertyControlValue(PropertyNames.AngleVariation, ControlInfoPropertyNames.DisplayName, "Angle Variation"); configUI.SetPropertyControlValue(PropertyNames.AngleMod1, ControlInfoPropertyNames.DisplayName, "Angle mod1"); configUI.SetPropertyControlValue(PropertyNames.AngleMod2, ControlInfoPropertyNames.DisplayName, "Angle mod2"); Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Andrew D Posted November 21, 2007 Share Posted November 21, 2007 Only 3/5 (about) of the UI is visible on a screen wide 1600x1200...[attachment=0]asfx.png[/attachment] Mabye in VS C# 2008 Express (yes, it's out and the old template still works apart from the PdnLib refrence) change the design to something more rectangular? Mabye a bit like the GenTree plug-in? Quote Link to comment Share on other sites More sharing options...
MadJik Posted November 21, 2007 Share Posted November 21, 2007 Only 3/5 (about) of the UI is visible on a screen wide 1600x1200...[attachment=0]asfx.png[/attachment] Mabye in VS C# 2008 Express (yes, it's out and the old template still works apart from the PdnLib refrence) change the design to something more rectangular? Mabye a bit like the GenTree plug-in? It's like that because I'm using the IndirectUI possibilities...I'll have to create my own form then... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
barkbark00 Posted November 21, 2007 Share Posted November 21, 2007 What does this effect allow for? Quote  Take responsibility for your own intelligence. 😉 -Rick Brewster Link to comment Share on other sites More sharing options...
MadJik Posted November 21, 2007 Share Posted November 21, 2007 What does this effect allow for? lol, I don't know (yet), it's some kind of conditional color tint with random/noisy things... I've tested it with CodeLab, but then I have to change manually the parameters... I even don't know how to call it... @Asmageddon Prince: could you give some more details... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Andrew D Posted November 21, 2007 Share Posted November 21, 2007 What does this effect allow for? lol, I don't know (yet), it's some kind of conditional color tint with random/noisy things... I've tested it with CodeLab, but then I have to change manually the parameters... I even don't know how to call it... @Asmageddon Prince: could you give some more details... Well, the UI is ginarmous to say the least, and you can't really create a form easily from it. BTW, as far as I can see, VS C# Express 2005 and 2008 are EXACTLY the same. Quote Link to comment Share on other sites More sharing options...
pyrochild Posted November 21, 2007 Share Posted November 21, 2007 BTW, as far as I can see, VS C# Express 2005 and 2008 are EXACTLY the same. At first glance, 2008 is just slightly prettier. Dig a little deeper, and you'll find gobs of new features and enhancements to old ones. Of course, I still recommend fullscale Visual Studio over the express editions any day, unless you're writing an XNA game. 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...
MattBlackLamb Posted November 21, 2007 Share Posted November 21, 2007 Madjik, I had a look at the UI you posted. Would the first two sliders be better off as radio buttons? Quote dA Son, someday you will make a girl happy for a short period of time. Then she'll leave you & be with men that are ten times better than you can imagine. These men are called musicians. Link to comment Share on other sites More sharing options...
Andrew D Posted November 21, 2007 Share Posted November 21, 2007 BTW, as far as I can see, VS C# Express 2005 and 2008 are EXACTLY the same. At first glance, 2008 is just slightly prettier. Dig a little deeper, and you'll find gobs of new features and enhancements to old ones. Of course, I still recommend fullscale Visual Studio over the express editions any day, unless you're writing an XNA game. I'll check the change log......they better have made good use of those 3 years...... They don't have a change log >_> Quote Link to comment Share on other sites More sharing options...
pyrochild Posted November 21, 2007 Share Posted November 21, 2007 @MattBlackLamb: Property system doesn't have an implementation for radio buttons, I think. It does, however, have dropdowns. But MadJik hasn't figured out how to make those work yet, and I haven't even bothered to try, as none of my new plugins need one yet. @Andrew D: The changes aren't just in Visual Studio; you'll need to poke around in .NET's change log to see all of what's new. 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...
MattBlackLamb Posted November 21, 2007 Share Posted November 21, 2007 Pyro, I'll openly admit to not being a coder (I know some very basic HTML & that's it), so I didn't know what is / was possible, I just thought radio buttons would make more sense than a slider. Quote dA Son, someday you will make a girl happy for a short period of time. Then she'll leave you & be with men that are ten times better than you can imagine. These men are called musicians. Link to comment Share on other sites More sharing options...
Andrew D Posted November 21, 2007 Share Posted November 21, 2007 I guess someone could just create a design in VS, then transport the main rendering functions onto those design things? Quote Link to comment Share on other sites More sharing options...
Ed Harvey Posted November 21, 2007 Share Posted November 21, 2007 BTW, as far as I can see, VS C# Express 2005 and 2008 are EXACTLY the same.Then you aren't looking hard enough ......they better have made good use of those 3 years...... Off Topic, but to be fair, it's only just over 2 years (2005-10-27 -> 2007-11-19) And you can't really make statements of entitlement like that, it's not like you paid for it Quote Link to comment Share on other sites More sharing options...
Andrew D Posted November 21, 2007 Share Posted November 21, 2007 BTW, as far as I can see, VS C# Express 2005 and 2008 are EXACTLY the same.Then you aren't looking hard enough ......they better have made good use of those 3 years...... Off Topic, but to be fair, it's only just over 2 years (2005-10-27 -> 2007-11-19) And you can't really make statements of entitlement like that, it's not like you paid for it Good point...... Anyways, I've had a little go at trying to get it done....got pretty much nowhere......mainly because I have no idea how to create the forms used in it.....even though I have PaintDotNet.System and all the other .dll's as refrences. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 21, 2007 Share Posted November 21, 2007 Only 3/5 (about) of the UI is visible on a screen wide 1600x1200...[attachment=0]asfx.png[/attachment] Can you send me the source code for what you're working on here? It's *supposed* to add a scroll bar if it gets too big. 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...
MadJik Posted November 21, 2007 Share Posted November 21, 2007 Only 3/5 (about) of the UI is visible on a screen wide 1600x1200... Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
MadJik Posted November 21, 2007 Share Posted November 21, 2007 Form project: (will take more time to implement the controls in the code...) Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 22, 2007 Share Posted November 22, 2007 Ok, I've corrected some layout issues that should make it work fine using IndirectUI. If the controls overflow the working area of the screen, then it will introduce a scrollbar automatically. I still cannot reproduce the Ctrl+F issue you claim to have. I changed your "mode" property to use a StaticListChoiceProperty, and everything worked perfectly fine. 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...
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.