Saving as an SVG, how? Multiple layers

Hi everyone

I have recently made a logo that’s made up of multiple layers. how do I save a project as a SVG that has multiple layers?

I tried when the layers were separate, but found only the first layer was saved as a SVG. Then I tried to merge the layers into one and the option was still greyed out. I have tried merging with vector on paint layers and vector on vector layers but get the same result with both.

I used Layer>import/export>save vector layer as svg

:slight_smile: Hello and welcome to the forum @Jibbalz!

Have you ever just saved as SVG? Unless it’s a translation error, I understand your description to mean that you selected only a single layer and exported it, so only that layer can be saved. Have a look in the manual. Only if you save it as (whole) SVG it can contain all layers, if it is implemented correctly in Krita (I didn’t test it).

Michelist

Krita supports SVG 1.1 which seems to not support layers.
If you use Inkscape and create a multilayer image, then Save it as SVG 1.1, it warns you that some features will be lost and it will then group each layer’s objects and produce a single layer image with each original layer as a grouped set of objects.

If you save as ‘inkscape svg’ (whatever that is) then Inkscape will open that as a layered vector image but krita will open it a a grouped single layer image.
Inkscape uses special markers that may be particular to Inkscape but I’ve no idea how all that works and how it may be different from other applications.

 <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1">
    <rect
       style=

If you import that into krita, it treats that as a group, not a layer.

If you want to create multi-layer .svg files then you need to use Inkscape or some similar application. You can export each .kra vector layer as .svg and then bring them into Inkscape in separate layers.

You could also edit the .kra output .svg files with an XML/text editor to manually create the layer structures according to the svg specification for layers, however they are done. That would be possible but tedious.

You need to merge the vector layers into a single layer, then you can export that layer as an svg. You can use the “Merge with layer below” to merge the vector layers. This has to be done 1 by 1, if you do multiple layers at once, it will turn into a paint layer (you can speed it up using Ctrl+E shortcut). Make sure you also merge only vector layers and nothing else.

Yes, those are Inkscape’s own namespace, so anything with that is not part of the svg spec (inkscape has their own svg subspec that is backwards compatible). End of the day, there is no difference between a layer and a group. Or in general, the display order of an svg is based on its index, the grouping is simply a convenient container that can be used to do layers or groups as one pleases.

Your correct, I just had to merge one vector layer at a time rather than all at once. This seemed to only work with vector on vector layers.

Is there a way to merge a paint layer with a vector layer and save as a .svg?

Unfortunately, No, Krita does not supported raster images in svg. You would have to make a spacer for it, then replace it with the image in a text editor. Or automate that with a python script.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.