Change svg: g id to inkscape: label
I made vector art in Inkscape, including layers and sublayers for further processing. I named all the layers in the UI and realized that the final SVG only creates an attribute inkscape:label
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?
source to share
I have the same requirement when I create svg for Fritzing because fritzing is not related to inkscape: shortcut. In such circumstances, I can verify that the label contains a valid id value. So I am making a script to save myself the messy and hard work.
Please note that the script ONLY READ "Regular SVG" . https://gist.github.com/TerrenceSun/972ef4eea97f331af1e6abfcafb7c6e5
source to share
I am not aware of the setup to automatically use the layer name as id. But why not do it the other way around: if you remove the attribute inkscape:label
, then the layer name will automatically become id
svg:g
in the inkscape UI. The attribute is inkscape:groupmode=layer
enough to make svg:g
the layer element.
source to share