I made a vector graphic in Inkscape, including layers and sub-layers for further use in Processing. I named all the layers in the UI, and realized that the final SVG only creates an inkscape:label
attribute with that name, but id
remains generic:
<svg:g id="layer1" inkscape:label="My custom label">
I know I can manually edit the labels in the XML editor, but is there a setting somewhere to automatically use the layer name as id?
I don't know about a setting to automatically use the layer name as id. But why not do it the other way round: if you remove the
inkscape:label
attribute, then the layer name automatically becomes theid
of thesvg:g
in the inkscape UI. The attributeinkscape:groupmode=layer
is enough to make thesvg:g
a layer element.