MJW Posted February 15, 2016 Share Posted February 15, 2016 (edited) For PropertyBasedEffects, I wish there were a control that was like the RollBallAndSliders control, but without the outer ring. For light directions, the control seems to me to be much nicer than the alternative of using the PanAndSlider (double vector) control, but the outer ring is meaningless. There are at least two ways it could be done. There could be a new control that returned a double pair, or there could be an option for the RollBallAndSliders control to not display the outer ring and associated slider, with no other change to its function. Edited February 15, 2016 by MJW Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 15, 2016 Share Posted February 15, 2016 Unlikely to happen IMHO. If you need this type of fine-grained control over the UI controls why not use a Win Form? As an example - see the roll control TechnoRobbo whipped up for the Planetoid plugin. 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 Link to comment Share on other sites More sharing options...
BoltBait Posted February 15, 2016 Share Posted February 15, 2016 Or, you could use the ball for light source and the outer ring for intensity of the light source. 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 February 15, 2016 Author Share Posted February 15, 2016 Unlikely to happen IMHO. If you need this type of fine-grained control over the UI controls why not use a Win Form Essentially it's because I'm much more interested in writing graphics code than in writing UI code. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 15, 2016 Share Posted February 15, 2016 Why not ignore the outer ring? Or use it for some other purpose? Warm vs. Cool colors? In Planetoid I used the outer ring to control the lighting focus (wide beam vs. narrow). Much like BoltBait suggested. This allowed you to have a diffuse or strongly directed lighting source. 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 Link to comment Share on other sites More sharing options...
MJW Posted February 15, 2016 Author Share Posted February 15, 2016 Or, you could use the ball for light source and the outer ring for intensity of the light source. I think it's slightly nonintuitive, but would probably be acceptable if it worked. Currently, I don't think it does, though perhaps I'm making a mistake. If I set the range to, for instance, 0 to 1, the slider works correctly, but it crashes as soon as try moving the ring clockwise. The range on the ring does not seem to follow the set range for the control value, so it returns a negative number, which is out of range. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted February 15, 2016 Share Posted February 15, 2016 If only that could be solved... with math. 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...
Ego Eram Reputo Posted February 15, 2016 Share Posted February 15, 2016 Correct me if I'm wrong - but isn't the range of the outer ring +/- 180 degrees? 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 Link to comment Share on other sites More sharing options...
MJW Posted February 16, 2016 Author Share Posted February 16, 2016 (edited) If only that could be solved... with math. Perhaps I'm dense, but I have no idea what your point is. If the outer ring won't return values within the specified range, then I can't see how it can be useful in allowing the user to specify the light intensity. Unless you expect the user to specify the light intensity in the range -180 to 180 -- which is a degree of kludginess I wouldn't even consider. Better to just ignore the outer ring. Edited February 16, 2016 by MJW Quote Link to comment Share on other sites More sharing options...
MJW Posted February 16, 2016 Author Share Posted February 16, 2016 Correct me if I'm wrong - but isn't the range of the outer ring +/- 180 degrees? That's what it seems to be. Which makes the control's min/max values pretty useless. Quote Link to comment Share on other sites More sharing options...
MJW Posted February 16, 2016 Author Share Posted February 16, 2016 (edited) Why not ignore the outer ring? Or use it for some other purpose? Warm vs. Cool colors? In my Texture Shader plugin, I ignore the outer ring. I don't like it, though. It's so inelegant to have a control, including a slider, that serves no purpose. I tried to come up with a decent use for the outer ring, but there aren't many things except angles for which a -180 to 180 range makes sense. I'm not optimistic my feature request will be granted. I hope it is. There are a number of plugins that use the PanAndSlider control to specify the direction of a light, but the ball control of the RollBallAndSliders control is a better fit. The one problem with the ball control is that it only allows light from the front, since the ball can't be turned backward. Light from the back is something of an anomaly, so I wouldn't have a particular problem with adding a checkbox that reverses the light direction, for plugins where that's desirable. (I currently have an experimental version of Texture Shader the uses the outer ring as a binary switch to select reversed light direction. I'm not crazy about it, but at least it determines the light direction like the rest of the control, and it's related to the light's angle, so the range kind of makes sense.) Edited February 16, 2016 by MJW Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 16, 2016 Share Posted February 16, 2016 The one problem with the ball control is that it only allows light from the front, since the ball can't be turned backward. And the outer ring does +/- 180 degrees. Positive figures for a frontal light source, negative figures for a backlight? 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 Link to comment Share on other sites More sharing options...
MJW Posted February 16, 2016 Author Share Posted February 16, 2016 Actually I currently use the less logical method of reversing the direction when the absolute value of the angle is greater than 90; that is, when the outer-ring tick mark is on the left side. I chose that so that a tiny clockwise movement from the default 0 position won't reverse the direction. However, your comment makes me realize it might be better to set the default to 90 and use your positive/negative method. Quote Link to comment Share on other sites More sharing options...
midora Posted February 16, 2016 Share Posted February 16, 2016 In OptionBased you may easily derive your own OptionControl and use it like the built-in ones to setup the dialog. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 16, 2016 Share Posted February 16, 2016 (empty comment to show that I'm listening to this thread) 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...
david.atwell Posted February 17, 2016 Share Posted February 17, 2016 (empty comment to show that I'm listening to this thread)Truly a baffling paradox. 1 Quote The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.Amy: But how did it end up in there?The Doctor: You know fairy tales. A good wizard tricked it.River Song: I hate good wizards in fairy tales; they always turn out to be him. Link to comment Share on other sites More sharing options...
MJW Posted February 17, 2016 Author Share Posted February 17, 2016 In OptionBased you may easily derive your own OptionControl and use it like the built-in ones to setup the dialog. I'm actively (whatever that means) considering using OptionBased effects. I wish there were more documentation, or at least more examples to copy from. I also wish it didn't require a separate DLL. That may concern me more than it ought to. It's probably not that big of deal, but somehow I just worry about maintenance problems. I guess I could try to merge with ILMerge. I'm not sure if that would result in very large plugin DLLs. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted February 17, 2016 Share Posted February 17, 2016 The current release of CodeLab uses ILMerge. It worked great. Very easy. 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 February 17, 2016 Share Posted February 17, 2016 very large plugin DLLs Like a few hundred KB? Pffft 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 February 17, 2016 Share Posted February 17, 2016 CodeLab is 1.5MB now. 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 February 17, 2016 Author Share Posted February 17, 2016 Thanks BoltBait! I look forward to trying out ILMerge. It may help with several plugin-related matters. Rick's no doubt correct about the increased plugin size not being that significant. I worry too much about such things. Nevertheless, that's quite an size increase for CodeLab. I've been distracted by some other things, and haven't gotten around to updating CodeLab for a while. The version I have is a mere 320 KB. It will be worth it if the code editor is improved. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted February 17, 2016 Share Posted February 17, 2016 "if"?! Ha! It is MAJORLY improved. 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.