i'm pretty sure the only major changes to input groups were that the variable associated with the group in the custom block now reports a list of lists instead of a 1d list. but i do not know if the ([slots V] of block (()@addInput) was changed from 1d to 2d lists (it now reports a 2d list but it may have done that from the beginning).
I do want to create something like that, but I've been putting it off because I'm not sure how to detect variadic inputs vs regular inputs. Plus, the new input groups would also be pretty hard to detect, unless I have some special syntax for grouping inputs together, but who knows how many people are actually going to use that?
I want to do it, and many blocks can be translated easily, unfortunately variadic inputs are really the culprit for my procrastination.
Custom blocks are easy, since I can literally just give them an empty definition, unless you define the block in the same snapblocks script (which snapblocks already detects), so that's not an issue. The only issue is detecting which inputs are in variadic inputs, and it's just gotten harder with separators, expand text, collapse text, and input groups.
Yes, I could use that, however that's not a solution to blocks without a definition hat, and I don't want you to have to include a custom block definition in order to convert to snapblocks.
O just took a look at this, and I didn't think about getting the xml of the block, then parsing the xml to get the color. That's actually a pretty cool thing.
I'm going to use this idea, but taking a look at your code and @tethrarxitet's code, I'm probably going to create my own, seeing as how both don't take into account primitive categories, and @tethrarxitet's assumes that the 8th quote is always the category color you want, which is probably not always the case.
I have an idea for a better script, one that instead grabs all the custom category colors, as well as trying to get the categories of the blocks in the xml, that way it can work for any snap xml, not just 1 block xml that is a custom category. This may seem more complicated and unnecessary, however I'd rather have redundancy that will guarantee that there are no errors, and work for any block.
I believe that it is always the case for custom categories, but I created my block specifically so that normal blocks return an empty string (but maybe mine doesnt work correctly, i forgot to test it).
what do you mean by
Well, what would happen if you put in multiple blocks? If the first one isn't a custom category, but the second is, the block will report the wrong category color (though that can be fixed by just only taking the first block instead).