lightknight Posted July 6, 2022 Share Posted July 6, 2022 Is there a way to determine whether a plugin is being previewed, or rendering the final output to the Paint.Net canvas? I found this post: And I am wondering if it still applies. Quote Link to comment Share on other sites More sharing options...
MJW Posted July 6, 2022 Share Posted July 6, 2022 Unfortunately, the answer is still no, despite the lobbying for it by @BoltBait and me. (I believe this question belongs in Plugin Developer Central.) EDIT: Hmm, did this get moved or was I mistaken about which forum it was posted in? In any event, it's where it belongs. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted July 6, 2022 Share Posted July 6, 2022 Nope. No way. Sorry. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Pixey Posted July 6, 2022 Share Posted July 6, 2022 14 hours ago, MJW said: EDIT: Hmm, did this get moved or was I mistaken about which forum it was posted in? It's okay @MJW you are not going gaga Someone did indeed move it 😁 1 Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
MJW Posted July 6, 2022 Share Posted July 6, 2022 3 hours ago, Pixey said: It's okay @MJW you are not going gaga Someone did indeed move it 😁 Thanks, Pixey! Glad to know I'm not becoming crazier than I already am. (Or at least this isn't evidence of it.) Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2022 Share Posted July 7, 2022 This is an intentional omission from the plugin system. I want Paint.NET to be a "WYSIWYGWYDI" (What You See Is What You Get, While You're Drawing It) system. None of the tools, for instance, ever do low-quality/preview rendering quality in order to improve framerate or latency. You always see exactly what you're going to get, no waiting for a second rendering pass. (this does put more pressure on having highly optimized rendering code, of course). I've always disliked how apps like GIMP and Photoshop do janky, low-quality, or "rubber band" rendering before you let go of the mouse button or press Enter. It's not a good experience. It's also just a lot harder to debug rendering code when you have two different modes for it to operate under. I didn't want that to be an ongoing issue for plugin developers. However, starting in 4.4, you can do something slightly different, and @BoltBait has had success with it. You'll be able to use tabs with IndirectUI, and you'll be able to determine which tab is selected via a Property. You can then use this to have a tab for Preview and a tab for Finalize, and change your rendering behavior based on that. This is a contrived example in my tweet, but @BoltBait might be willing to share a screenshot from some of the things he's been working on: 1 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...
Rick Brewster Posted July 7, 2022 Share Posted July 7, 2022 (also, nested tab containers do work -- @otuncelli tried that first thing, it crashed, and I fixed 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...
Reptillian Posted July 7, 2022 Share Posted July 7, 2022 (edited) Speaking of IndirectUI, will there be a option to just hide options altogether depending on input? At least tabs enables me to convert some few more G'MIC filters to Codelab/Visual Studio when the time comes. Yes, I'm aware that I would have to go beyond IndirectUI if I wanted 1:1 conversion for many of them, and that is too much work. Edited July 7, 2022 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2022 Share Posted July 7, 2022 I'm not sure what you mean by hiding based on input? 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...
Reptillian Posted July 7, 2022 Share Posted July 7, 2022 (edited) 9 minutes ago, Rick Brewster said: I'm not sure what you mean by hiding based on input? Ok, let me explain a bit. There are two GUI elements. GUI #1 - Dropdown Options GUI #2 - Integer Slider If the user pick index 0 of GUI #1, then GUI #2 becomes hidden. Why is this useful, this enables programmers to use more variables without the headache of trying to do compromise from the user's perspective. Edited July 7, 2022 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
BoltBait Posted July 7, 2022 Share Posted July 7, 2022 While you can't hide things, you can make controls "disabled" based on the state of other controls. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2022 Share Posted July 7, 2022 I see. So right now, as @BoltBait said, you can disable controls based on values from other IndirectUI properties. You cannot currently hide them. 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 July 7, 2022 Share Posted July 7, 2022 2 hours ago, Rick Brewster said: This is a contrived example in my tweet, but @BoltBait might be willing to share a screenshot from some of the things he's been working on: I usually don't talk publicly about pre-release builds of Paint.NET or my plugin pack. But, since @Rick Brewster has invited me to do so, here's a quick look at what's coming in Paint.NET v4.4+ If you're familiar with my plugin pack, here's an old plugin of mine called Effects > Photo > Level Horizon/Plum Bob: It basically has two modes: marking the horizon and finalizing your image by increasing the zoom slightly to fill out the canvas once the rotation has been done. This is accomplished by clicking the "Show guidelines" checkbox--a little clunky, I admit. Rick has been very generous by sharing with me the pre-release builds of Paint.NET as he's developing the next version. This is to give me time to prepare my plugin pack by taking advantage of new plugin features and making sure everything still works! Plugin authors are getting two BIG features in the next release: IndirectUI tabs and the ability to easily write GPU accelerated effects. He's been helping me convert some of my plugins to GPU acceleration. During this process, he's seeing areas to improve Paint.NET to make it easier for us plugin authors and also fixing a few bugs along the way. My next version of Level Horizon takes advantage of both of these features. I split the functionality into two tabs, the first tab is for marking your horizon and the second is for finalizing your image. Here's how it looks (UI not finalized and could change before release): ...and... As you can see, the plugin can tell which tab is active and change it's rendering based on the currently active tab. Also, you can't tell here, but because the new version is GPU accelerated, it actually renders MUCH faster than the current version and because it uses Direct2D code, the resulting rotated bitmap is higher quality. One thing I really like about tabs is the ability to organize your controls by logical function thus making your own UI much shorter covering less of the image you're modifying. I hope this sparks some ideas in your head as to how you can implement your vision! (BTW, as Paint.NET v4.4 gets closer to release I will be reworking CodeLab to support IndirectUI tabs and GPU acceleration. I will also continue my series of tutorials covering both topics as well.) 1 1 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
MJW Posted July 7, 2022 Share Posted July 7, 2022 4 hours ago, Rick Brewster said: This is an intentional omission from the plugin system. But can't a plugin that doesn't use IndirectUI do that? If so, it's an omission from IndirectUI, not from the plugin system; and how much consistency is gained by that? I somewhat sympathize with the WYSIWYG objective, but I think there are some plugins where considerably more is gained than is lost by allowing it. BoltBait's Horizon plugin and my Texture Merger plugin being particular examples. Anyone writing a plugin that used the feature without clearly revealing it in the UI would be a fool. For instance, I'd add a checkbox control to Texture Merger saying something like "Disable Shading for Final Image." Quote Link to comment Share on other sites More sharing options...
MJW Posted July 7, 2022 Share Posted July 7, 2022 3 hours ago, BoltBait said: I will also continue my series of tutorials covering both topics as well.) I look forward to that. I yearn for an "Idiot's Guide to GPU Shading." So far I really don't have a clue about what GPU shaders can do, or how to do whatever it is they can do. I'm somewhat aware of some of those built-in Adjustment-type things (like changing the contrast) which honestly don't hold much interest for me. EDIT: There is one possible objection, which I've kept to myself, but will mention. Will the use of GPU shading for so many built-in Effects and plugins essentially make PDN worthless without hardware acceleration; and perhaps without sufficient hardware acceleration? Will PDN run super-fast for those with gaming systems, but dog slow for everyone with older or low-end systems? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2022 Share Posted July 7, 2022 I've been doing testing on lower-end GPU hardware and the performance has actually been quite good. The story is not the same when GPU acceleration is disabled, some of the shaders perform quite poorly but I think I can still optimize it. But even the GeForce 560 I found lying around did a pretty good job on all the new shaders. The GF560 was released in 2011. The lowest iGPU I've been able to get ahold of is on a Core i5-6260U w/ Intel Iris Plus, and it also did a pretty good job. 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...
MJW Posted July 7, 2022 Share Posted July 7, 2022 2 hours ago, Rick Brewster said: The GF560 was released in 2011. That's pretty old, but it still had 336 shaders and 1 GB of graphics memory. I was particularly wondering about systems using integrated graphics, rather than a card, and shared graphics memory. I suppose the Core i5-6260U w/ Intel Iris Plus fits into that category. I very much appreciate the information. Quote Link to comment Share on other sites More sharing options...
TrevorOutlaw Posted July 7, 2022 Share Posted July 7, 2022 I am really excited about the addition of tabs in UI, and that was something I once asked about, and I believe BoltBait said that Indirect UI does not allow tabs. I think that will help improve a lot of the plug-ins that have tallish interface by rearranging the interface, as BoltBait said, logically. Quote Paint.NET Gallery | Remove Foreground Object Tutorial | Dispersion Effect Tutorial Link to comment Share on other sites More sharing options...
BoltBait Posted July 8, 2022 Share Posted July 8, 2022 On 7/7/2022 at 2:52 PM, TrevorOutlaw said: I am really excited about the addition of tabs in UI, and that was something I once asked about, and I believe BoltBait said that Indirect UI does not allow tabs. I think that will help improve a lot of the plug-ins that have tallish interface by rearranging the interface, as BoltBait said, logically. Yes, I'm in love with the new tabs feature. For example, here's my current Creative Text Pro v1.1 which has a very tall UI: As you can see, I have labeled the 4 logical areas (above) and here is the next version utilizing tabs: Much better, don't you think? Anyway, I'm going through the long process of revisiting all of my plugins and adding tabs where appropriate and GPU accelerating them when possible. I'm hoping to be done by the time Rick publishes the first public Beta of the next version of Paint.NET*. This is taking a long time as I'm just learning GPU acceleration myself. And, every time I get stuck on something Rick says either, "That's easy, let me show you how to do that," or "oh, here, let me add some new feature to Paint.NET to make that easier for you." So, there's that! *I can't read Rick's mind, but if I was to guess, this will be sometime in November 2022. 1 1 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
TrevorOutlaw Posted July 8, 2022 Share Posted July 8, 2022 That's it, I was trying to find where I asked if tabs could be put in the UI, and the thread of Creative Text Pro had it all along. Yes, it looks better organized. I am eager to read the source code so I can understand how tabs works. Quote Paint.NET Gallery | Remove Foreground Object Tutorial | Dispersion Effect Tutorial Link to comment Share on other sites More sharing options...
BoltBait Posted July 8, 2022 Share Posted July 8, 2022 35 minutes ago, TrevorOutlaw said: That's it, I was trying to find where I asked if tabs could be put in the UI, and the thread of Creative Text Pro had it all along. Yes, it looks better organized. I am eager to read the source code so I can understand how tabs works. Tabs are VERY easy. Converting my plugin to use tabs takes about 10 minutes. I’ll be writing a tutorial about them and converting CodeLab to handle tabs. 1 1 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about 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.