Dears,
As much as I hate doing so, I’m here today to complain about the GUI Editor’s JSON export.
I guess yours know how much I like this tool and I’m also advocating for it, so this is why I cannot let this through .
While struggling to port my sketched GUI in the editor to production (because I cannot replace the links from my dropbox with my production links within the editor - a topic posted separetely and a discussion I quickly had with @deltakosh here – Gui Editor (how to) move to production? - #12 by Deltakosh)… it gave me the opportunity to save to json and edit the export for manual change of the production links for my images.
And this is where I nearly fell from my chair when opening the file:
Believe it or don’t (although it will be hard to deny with the samples attached below), my fairly crude not to say ‘basic’ GUI created in the GUI Editor and saved to json totalizes about 45k lines of properties!!!
That’s about twice what I have in my entire ‘Space Museum’ scene.
While it took me about 20min only to be able to reformat the JSON to push each property to a new row within my text editor, I realized that the file contains at least 90 to 95% of completely useless passed-on properties and parameters (which are defaults). It looks to me like generating the json takes just each and every single parameter and property available in the API and passes it single-handedly for each container and control. In fact, there are some in there that, honestly, I didn’t even know they exist
Fact is this JSON output from the Editor is 1) nothing even close to optimized 2) barely manageable/useable. I don’t know if the snippet version does the same?
Fact is, even with my shit-dev skills, if I was to reproduce this GUI in code, I would likely have something like 500 lines (while being careless). Here, I have 45k, seriously? I don’t even want to check out my FS GUI which is about 5 times the complexity would look like in the JSON.
So, below is the link to this GUI in the Editor:
And here for the text file, pushed to lines, from the saved JSON:
elevgui_json_lines.txt.zip (24.0 KB)
It should basically look like this (screenshot of the first 65 lines… out of 45000):
Now, @carolhmj @PatrickRyan , what I am expecting following the above is that you would tell me something like “Yes, mawa, this is clearly not what it should be and we are going to take care of this ”… I mean, I believe I can understand the complexity behind it and eventually why it is like this at this moment… but honestly, anyone out there who thinks we can really leave it this way? Just asking and of course, as always, my opinion only.
Meanwhile, have a great day