midora Posted November 13, 2012 Share Posted November 13, 2012 I can't see a way to set one or all properties after the dialog is open. So to add a possibility to do this in OnSetRenderInfo() after detecting of a button press would be nice. Maybe by copying the token, changing of some or all properties and calling a new method in PropertyBasedEffect. I would use it to copy/paste the properties to/from the clipboard in xml format. Not to difficult to write a general function to enumerate the properties in the token. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 13, 2012 Share Posted November 13, 2012 Not possible, and this is intentional. Plugins don't have write access to the properties. IndirectUI is a "closed system" in that you can't customize it beyond what customizations are already provided, nor add new capabilities beyond what is already specifically provided. This was done to ensure that things would just work, without extra event handlers or "external" code jumping in and thus creating a rat's nest of reentrancy and dependencies on ordering or circumstances. The result is a limitation in capabilities for the developer, but also a diamond-studded armor coating of reliability and stability for the user. The feature you actually want, however, which is the ability to save/load the property bag, is something I'm hoping to add at some point. It'd be very useful, and rather straightforward to add it for all IndirectUI-based effects. No promises on any timeframe, however. 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...
midora Posted November 20, 2012 Author Share Posted November 20, 2012 A property object which would allow to save/load and copy/paste the bag via xml would be a good solution. The default value for this new kind of property could be a unique plugin tag which would be checked on load. Still a method to set a complete token would not break the bag concept. This is just the other way round than to read the values from the token you are getting in the OnRenderSetting method.IndirectUI would still be the only one accessing the controls. We all know that you are busy on 4.0 and do not expect a time frame. The plugin developers just like to provide hints about their needs. On my list there is also a better concept for a reseed property which would allows to fix the seed to get reproducable results. The seed should then also be stored in the bag. davidf implemented it by adding a 'Randomization code'. I'm just using a int32 property where reseed means to change the number. But a special property would be better. Together with the concept of loading and saving bags it would also be nice to add the possibility to show a set of example thumbnails. Clicking on an example would load the bag of the example to the current bag, The developer could provide bags in an OnXXX method to render the examples. Quote Link to comment Share on other sites More sharing options...
midora Posted November 23, 2012 Author Share Posted November 23, 2012 One additional remark. If something like this would be implemented some day then please use xml as format and not serialized data. I know this would be easierer and more .NET like but to exchange snippets provided in a forum would be more difficult. Quote 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.