Well, the title explains itself.
I've just traced a bitmap and was confused to see dozens of g elements in my Objects table.
Many g elements are nested within each other, for no apparent reason. Do I really need to have a single path nested inside a g, which is nested inside a g, which is nested inside a g, which is nested inside a g?
Moreover, there are many completely empty g elements. No idea where they came from. I myself haven't used the "Group" or "Layer" command even once on this graphic.
What's the reason for this? This creates crazy markup bloat and confusion. How to address this? Manually pop all my paths out of the groups? This will take me a whole day. I have zero need for any g elements.
Why does Inkscape unnecessarily create multiple g elements?
Re: Why does Inkscape unnecessarily create multiple g elements?
I don't know about the "why", other than to say that the bitmap tracing code uses a third-party library (POTRACE) to do the hard work. Whether the extra groups come from that, or from Inkscape, I'm not sure - but getting rid of them is fairly easy.
The manual approach is easier than you make it sound. Just select your object then repeatedly press the Ungroup button, until the status bar at the bottom of the window shows "No groups to ungroup". Even for groups nested quite deeply this should only take a few seconds. In the unlikely event that you have nesting that is hundreds or thousands of levels deep, you can use the Extensions > Arrange > Deep Ungroup extension to deal with them all at once. I covered it in Part 71 of my tutorial series: viewtopic.php?f=6&t=11981
The manual approach is easier than you make it sound. Just select your object then repeatedly press the Ungroup button, until the status bar at the bottom of the window shows "No groups to ungroup". Even for groups nested quite deeply this should only take a few seconds. In the unlikely event that you have nesting that is hundreds or thousands of levels deep, you can use the Extensions > Arrange > Deep Ungroup extension to deal with them all at once. I covered it in Part 71 of my tutorial series: viewtopic.php?f=6&t=11981
Re: Why does Inkscape unnecessarily create multiple g elements?
Great! Second time you're helping me today. You made an insanely good tutorial, by the way. Thanks!