Reptillian Posted October 19, 2020 Share Posted October 19, 2020 I have a question with regards to Codelab. Right now this works DoubleSliderControl Something = 1; // [0,1] {Variable} Red Weight However, this does not. DoubleSliderControl Something = 1; // [0,1] {Variable!=5} Red Weight What would be the solution? Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
BoltBait Posted October 19, 2020 Share Posted October 19, 2020 5 hours ago, Reptillian said: However, this does not. What you have typed is not part of the proper syntax for user controls. I would recommend using the UI Designer to make what you want. Let it generate the code for you. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Reptillian Posted October 19, 2020 Share Posted October 19, 2020 2 hours ago, BoltBait said: What you have typed is not part of the proper syntax for user controls. I would recommend using the UI Designer to make what you want. Let it generate the code for you. I see only binary options there. Checked or is not checked. No way to use conditions like Variable==4. Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 20, 2020 Share Posted October 20, 2020 17 minutes ago, Reptillian said: I see only binary options there. Checked or is not checked. No way to use conditions like Variable==4. There's no way to do that from CodeLab. You'll have to export the plugin to Visual Studio. Here's some example code for the property rule: new ReadOnlyBoundToValueRule<int, Int32Property>(PropertyNames.Target, PropertyNames.Source, 5, false) Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
NSD Posted October 23, 2020 Share Posted October 23, 2020 I have two identical C # files. One is recognized by CodeLab the other is not. The event happened after I saved the files on the Desktop. After saving, when reopened, one of them is no longer recognized. Untitled2.zip Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 23, 2020 Share Posted October 23, 2020 @NSD In your second image, the src and dst parameters have been swapped. They need to be in the correct order. Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
BoltBait Posted October 23, 2020 Share Posted October 23, 2020 15 minutes ago, NSD said: I have two identical C # files. Those files are not identical. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
NSD Posted October 24, 2020 Share Posted October 24, 2020 Sorry for my mistake... fatigue and haste. However, this means that CodeLab detects the erroneous parameters of the Render method. Wouldn't it be nice to generate an error message? Quote Link to comment Share on other sites More sharing options...
Vasyna Posted October 25, 2020 Share Posted October 25, 2020 On 5/21/2020 at 9:29 AM, BoltBait said: CodeLab 5.4 Released This is only for Paint.NET 4.2.11+! (This is the last update before toe_head2001 rewrites the entire compiler section.) I've tried to read the docs to understand what it's all about but the links are broken at https://www.boltbait.com/pdn/CodeLab/ Quote Link to comment Share on other sites More sharing options...
BoltBait Posted October 25, 2020 Share Posted October 25, 2020 4 hours ago, Vasyna said: links are broken at https://www.boltbait.com/pdn/CodeLab/ Fixed. Thanks for the report. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Reptillian Posted November 2, 2020 Share Posted November 2, 2020 (edited) I think I replicated the bug. Copy and paste this to options under dropdown Normal|Normal Inverted|Arctangent|Tangent|Tanh Stroke|Asymphological Vibrato|Asymphological Basic|Asymphological Basic 2|Asymphochaos|Petallian|Semi-Thorny Petallian|Thorny Petal 1,Thorny Petal 2|Inflation|Inflation 2|Chaotic Creation|Earthing|Acrylic Earthing|Unearthing Origami|Cubic Unearthing|Webbing Cubic Unearthing|Chaotic Hooks|Echo Wide|Echo Squircle|Echo Hall|Echo Hall 2|Liquid Parabolic|Chaos-Vibrato|Chaos Deep-Vibrato|Chaos Spacetime|Parabolic|Parabolic Chaos|Cubic-Diamond Chaos|C-Line|Contour Chaos|Spiderweb-Diamond|Acrylica|Refractive Space|Smooth-Artistry|Ferrofluid|Triangular Interweaving|Fabric Chaos|Reverse Tangent Division|Chaotic Tangent|Alternating Chaos 1 (Legacy)|Alternating Chaos 2 (Legacy)|Alternating Chaos 3 (Legacy)|Alternating Chaos 4 (Legacy)|Alternating Chaos 1|Alternating Chaos 2|Alternating Chaos 3|Alternating Chaos 4 Error: Preview can't be displayed. Note: Works fine outside of UI designer. Also works when you exit UI designer and enter again. Just not when you copy and paste that directly into UI designer after you set to dropdown. Edited November 2, 2020 by Reptillian Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
toe_head2001 Posted November 22, 2020 Share Posted November 22, 2020 On 11/2/2020 at 1:13 AM, Reptillian said: I think I replicated the bug. I have not been able to reproduce this issue when coping the Dropdown items into the UI Designer. Can you provide the exacts steps to experience the issue? Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
toe_head2001 Posted November 22, 2020 Share Posted November 22, 2020 On 10/24/2020 at 9:54 AM, NSD said: ... this means that CodeLab detects the erroneous parameters of the Render method. Actually, no, it does not detect erroneous parameters. All CodeLab knows is that your file did not have the correct signature for the Render method. It has no idea why. Since the file did not have the correct signature, it was opened as a plain text file. 1 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Reptillian Posted December 4, 2020 Share Posted December 4, 2020 (edited) Never mind. I fixed it. Only one question remains: I cannot set multiple rules to ConfigUI per object? There are 3 different drop-down choices that I would like to activate one ui element. Edited December 5, 2020 by Reptillian Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 7, 2020 Share Posted December 7, 2020 On 12/4/2020 at 7:15 PM, Reptillian said: There are 3 different drop-down choices that I would like to activate one ui element. This was discussed a while back, and I believe @MJW provided the solution you need: https://forums.getpaint.net/topic/111979-indirect-ui-–-property-rules/?do=findComment&comment=538475 Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Reptillian Posted December 20, 2020 Share Posted December 20, 2020 (edited) Can string input box have display names? I just tested it, and without it, it's not convenient. For context, I wanted to convert G'MIC-QT Thorn Fractal to GMIC-C#, and having display names would make it you know useful as the G'MIC-QT version has a lot of string input boxes for custom formula. Here, a code to use to demonstrate: #region UICode ListBoxControl preform = 0; // {cusform} Predefined Formula|Normal|Normal Inverted|Arctangent|Tangent|Tanh Stroke|Asymphological Vibrato|Asymphological Basic|Asymphological Basic 2|Asymphochaos|Petallian|Semi-Thorny Petallian|Thorny Petal 1|Thorny Petal 2|Inflation|Inflation 2|Chaotic Creation|Earthing|Acrylic Earthing|Unearthing Origami|Cubic Unearthing|Webbing Cubic Unearthing|Chaotic Hooks|Echo Wide|Echo Squircle|Echo Hall|Echo Hall 2|Liquid Parabolic|Chaos-Vibrato|Chaos Deep-Vibrato|Chaos Spacetime|Parabolic|Parabolic Chaos|Cubic-Diamond Chaos|C-Line|Contour Chaos|Spiderweb-Diamond|Acrylica|Refractive Space|Smooth-Artistry|Ferrofluid|Triangular Interweaving|Fabric Chaos|Reverse Tangent Division|Chaotic Tangent|Alternating Chaos 1 (Legacy)|Alternating Chaos 2 (Legacy)|Alternating Chaos 3 (Legacy)|Alternating Chaos 4 (Legacy)|Alternating Chaos 1|Alternating Chaos 2|Alternating Chaos 3|Alternating Chaos 4 ListBoxControl cusform = 0; // Custom Formula|None|Custom Formula|Alternating Custom Formula Level 1|Alternating Custom Formula Level 2|Alternative Custom Formula Level 3|Alternating Custom Formula Level 4 IntSliderControl escape = 10000; // [5,3000000] Escape Value IntSliderControl loop = 255; // [1,1024] Loop Limitation DoubleSliderControl sub = 3; // [1,10] Subsampling Level DoubleSliderControl dx = 0; // [-50,50] Distortion X DoubleSliderControl dy = 0; // [-50,50] Distortion Y DoubleSliderControl sxy = 1; // [0.1,15] Scaling XY-Axis DoubleSliderControl sx = 1; // [0.1,15] Scaling X-Axis DoubleSliderControl sy = 1; // [0.1,15] Scaling Y-Axis CheckboxControl spi = true; // PI-Based Scaling DoubleSliderControl offx = 0; // [-5,5] Offset X -Transformation DoubleSliderControl offy = 0; // [-5,5] Offset Y -Transformation AngleControl ang = 0; // [-180,180] Function Angle TextboxControl vx_a = ""; // [10] TextboxControl vy_a = ""; // [10] TextboxControl vx_b = ""; // [10] TextboxControl vy_b = ""; // [10] TextboxControl vx_c = ""; // [10] TextboxControl vy_c = ""; // [10] TextboxControl vx_d = ""; // [10] TextboxControl vy_d = ""; // [10] TextboxControl vx_e = ""; // [10] TextboxControl vy_e = ""; // [10] #endregion Adding display name does nothing, and they disappear. Edited December 20, 2020 by Reptillian Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
BoltBait Posted December 20, 2020 Share Posted December 20, 2020 59 minutes ago, Reptillian said: Can string input box have display names? Yes, this works fine. I added some display names to your text controls and they worked fine. With that many controls, you do need to scroll to see them all. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
Reptillian Posted December 20, 2020 Share Posted December 20, 2020 I figured out why it didn't work. I was using [] characters. Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
toe_head2001 Posted December 23, 2020 Share Posted December 23, 2020 On 12/20/2020 at 10:38 AM, Reptillian said: I figured out why it didn't work. I was using [] characters. Hmm, sounds like we could improve the parsing that's happening there. Only the first set of square brackets should be parsed as non-text. Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
HCGS Posted January 6, 2021 Share Posted January 6, 2021 Aww, no option to use tabs instead of spaces? Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 6, 2021 Share Posted January 6, 2021 1 hour ago, HCGS said: Aww, no option to use tabs instead of spaces? Why would you want to use Tabs in C# ? Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
HCGS Posted January 6, 2021 Share Posted January 6, 2021 Just now, toe_head2001 said: Why would you want to use Tabs in C# ? Well. I always use tabs on every language. It's just better. Spaces are slower to work with, can mess indents accidentally and, in general, make no sense at all. I know there's a bunch of code style conventions in C#, but is spaces vs. tabs really one of them? I've been using C# for years and have never heard of this. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted January 6, 2021 Share Posted January 6, 2021 Most people don't use tabs with any C style language. 10 minutes ago, HCGS said: Spaces are slower to work with, can mess indents accidentally and, in general, make no sense at all. That's completely subjective. The same exact things can be said about tabs. I'm not even joking. The standout issue with tabs is variable tab width among different environments. For you a tab width might appears as 40px, but for other people it might be 80px. This is very evident in web browsers. For some reason, a tab is about double the normal (if there is such a thing) width in a web browser. A space is always the same width. The good news is that modern editors will automatically correct indents, whether you're using tabs or spaces, so one's preference doesn't really matter. Unless, you're sharing code (working on a team), then you'll mostly likely be forced to use spaces, since that's what most people prefer. Anyway, it would be very easy to add an option to CodeLab for tabs. However, all the templates within CodeLab are hard-coded with spaces. So basically, you would easily end up with a document mixed with tabs and spaces. Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Reptillian Posted January 6, 2021 Share Posted January 6, 2021 36 minutes ago, HCGS said: Well. I always use tabs on every language. It's just better. Spaces are slower to work with, can mess indents accidentally and, in general, make no sense at all. I know there's a bunch of code style conventions in C#, but is spaces vs. tabs really one of them? I've been using C# for years and have never heard of this. If you're not working on team and doing things for yourself, then chances are you might have your own formatting style, and the most important thing is that you are able to modify it later and to get the code right. I work with mixed tabs/spaces with the goal of being able to be read easily from my POV, and it actually deviates from automatic reformatting. Quote G'MIC Filter Developer I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me. Link to comment Share on other sites More sharing options...
BoltBait Posted January 6, 2021 Share Posted January 6, 2021 BoltBait toe_head2001 Reptillian 1 Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free 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.