HenryH Posted December 21, 2023 Posted December 21, 2023 it'd be nice if PDN remembered all the parameters to a Plugin-Effect-Command from the last time i used it --- e.g. on the previous day. For example, SquirkleWarp has these parameters and more: pos-X, pos-Y, angle, wide, shape, size magnification, curvature, .... Quote
Welsh Yellow Cheddar Posted December 21, 2023 Posted December 21, 2023 Hello, When using plugins, if there is a particular setting I want to remember, I make a screen shot and include it on a layer. I do the same when using fonts, I write the name of the fonts and the sizes used. It takes just a few seconds and saves me a lot of time. I do this because I know I won't remember.😁 1 1 1 Quote
Rick Brewster Posted December 21, 2023 Posted December 21, 2023 It will remember the settings for an effect until you exit Paint.NET. I'm considering a feature that would add some kind of save/load/undo/redo toolbar at the bottom of most effects and adjustments (those that are IndirectUI-based). It wouldn't be available until sometime later next year, however. 1 4 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Red ochre Posted December 21, 2023 Posted December 21, 2023 40 minutes ago, Rick Brewster said: I'm considering a feature that would add some kind of save/load/undo/redo toolbar at the bottom of most effects and adjustments (those that are IndirectUI-based). Would a global 'File/export settings' and 'File/import settings' be possible? (to save all the tokens for effects/adjustments used in that session). I've no idea whether that is practical or how much work would be involved but saving all changed settings at once may be easier for the user and avoid appending a tool bar to each Effect's Indirect U.I. Any standardised method of saving effect settings using IndirectU.I. would be greatly appreciated! 1 Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings
Rick Brewster Posted December 21, 2023 Posted December 21, 2023 1 hour ago, Red ochre said: Would a global 'File/export settings' and 'File/import settings' be possible? (to save all the tokens for effects/adjustments used in that session). Quite possibly, just remind me again if/when the features comes out in an alpha/beta 2 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Ego Eram Reputo Posted December 21, 2023 Posted December 21, 2023 6 hours ago, Red ochre said: Would a global 'File/export settings' and 'File/import settings' be possible? (to save all the tokens for effects/adjustments used in that session). FYI - It's relatively easy to save & load a set of tokens. This is what I used in Planetoid to save planets. private void ButtonSave_Click(object sender, EventArgs e) { TryPlaySound(@"C:\Windows\Media\Windows Battery Low.wav"); using System.Windows.Forms.SaveFileDialog svfd = new(); svfd.FileName = "Untitled"; // set default title // get last used path svfd.InitialDirectory = GetLastFolder(); // look for *.pln files svfd.Filter = "Planetoid Files (.pln)|*.pln|All Files (*.*)|*.*"; svfd.FilterIndex = 1; svfd.OverwritePrompt = true; // Show the filename extension svfd.AddExtension = true; if (svfd.ShowDialog() == DialogResult.OK) { using (FileStream stream = File.Open(svfd.FileName, FileMode.Create)) { Token.SaveTo(stream); } // show Ok message MessageBox.Show(this, "Dude, you saved an entire planet.", "What a hero!", MessageBoxButtons.OK, MessageBoxIcon.Information); // store path in case it changed. SaveLastFolder(svfd.FileName); // // ************** Cool little trick: put the saved filename into the plugin title! :) ******************* // Text = Path.GetFileName(svfd.FileName) + " - " + ActiveForm.Text; } else { // Wasn't saved - informal message to say so. MessageBox.Show(this, "You're probably like...'Whatever Man' but I should tell you that Planet wasn't saved!", "Whoa....Dude!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } Loading snippet.... using (FileStream stream = File.OpenRead(ofd.FileName)) { PlanetoidEffectConfigToken token = PlanetoidEffectConfigToken.LoadFrom(stream); InitDialogFromToken(token); FinishTokenUpdate(); } 1 1 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
Red ochre Posted December 22, 2023 Posted December 22, 2023 I was hoping for a way to save the settings of all the (indirectUI) effects/adjustments used in a session, not relying on a particular effect having a its own way of saving. Actually @Null54 kindly added some code to my Scribble effect to allow saving settings in .xml but that was done using Visual studio and Windows forms, as I remember, it was 10 years ago!...11th post on this page: Null54's Scribble src code ... but many thanks for your example code too! ...Sadly I haven't really got the spare time to experiment and learn/re-learn at the moment.☹️ I believe a way to save settings for existing indirectUI effects/adjustments would be far broader and more useful. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings
Rick Brewster Posted December 22, 2023 Posted December 22, 2023 As long as an IndirectUI effect is using the set of standard built-in types, and isn't trying to use raw objects in its properties, it should be auto-serializable. IndirectUI plugins can't do this on their own; their UI is declarative, with no room for customization beyond what's available in-box. So what works for Planetoid will not work for them. The reason I'd be targeting IndirectUI effects is that they are by far the vast majority of effect/adjustment plugins out there (and the majority of built-ins as well). Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
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.