From more layers to one

Post questions on how to use or achieve an effect in Inkscape.
orangexm
Posts: 3
Joined: Thu May 31, 2018 11:22 pm

From more layers to one

Postby orangexm » Thu May 31, 2018 11:27 pm

So yesterday I was working on a map for my uni, I had many layers on my project, I saved it and today when I wanted to start working again I had the unpleasent surprise to see all the layers merged in just one layer, is there any way to "restore" all the layers? without separate layers I can't work and moving each element to a new layer is just suicide work.

User avatar
Xav
Posts: 1118
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: From more layers to one

Postby Xav » Fri Jun 01, 2018 1:02 am

SVG (the format Inkscape uses) doesn't have a notion of layers, so they are implemented as SVG groups with an additional attribute in the code. Are your elements still in groups? If so, you might be able to fix it by just adding the attribute to each group.

An obvious question, however, is how this happened in the first place. Did you load or edit the file in another application? If so, it may not have preserved the extra Inkscape-specific attribute.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

orangexm
Posts: 3
Joined: Thu May 31, 2018 11:22 pm

Re: From more layers to one

Postby orangexm » Fri Jun 01, 2018 1:33 am

The elements are still in groups, but the order of the layers was the most important thing, otherwise I have to figure out the position of each element, who was above who and doing that on this is just pointless >>>> Image

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: From more layers to one

Postby prkos » Fri Jun 01, 2018 5:12 am

You don't have to reorder them through the interface. Open the SVG file in a text editor, and add the missing attributes to turn the groups into layers manually, by typing them. I expect the groups will be in the exact same order the layers were ;) so simply adding the correct pieces of text to them will restore it.

It's possible you didn't save your work as Inkscape SVG, but some other type like Plain SVG or Optimized SVG, and that was what caused some features to be removed.

It's always recommended, whatever software you use, to always save your work in the native format (Inkscape SVG if you want to save info about Grids, Guides, Layers etc). Then export to other formats as the need arises.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Moini
Posts: 2772
Joined: Mon Oct 05, 2015 10:44 am

Re: From more layers to one

Postby Moini » Fri Jun 01, 2018 7:19 am

The conversion from group to layer works faster with the objects dialog. There you'd only need to click on the group/layer icon to switch between both.

Maybe you saved as optimized or plain SVG?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

orangexm
Posts: 3
Joined: Thu May 31, 2018 11:22 pm

Re: From more layers to one

Postby orangexm » Fri Jun 01, 2018 9:02 am

Thanks for helping me out, I always saved it as .SVG, now thanks to you I understand what happens, but I still wanna know if this can be "fixed" automaticallly .

So in the upper image I have the layers and I can see them in the tab, after I save it as .SVG and open it again the layers from the layers tab disappear but I can still select each one of the groups, it is possible when I open the project again to make the layers appear in the layer tab as in they are in the upper pic so I don't have to manually turn groups into layers? Sometimes I can't order them up until I don't have all the layers so I just give them random layer position until I'm done.

Image

Moini
Posts: 2772
Joined: Mon Oct 05, 2015 10:44 am

Re: From more layers to one

Postby Moini » Fri Jun 01, 2018 11:21 am

Inkscape offers to save as 'Optimized SVG', 'Plain SVG' and 'Inkscape SVG'. 'Inkscape SVG' is what you want, if you want to keep the layers.
There is no automated way, unless you have made backups or autosaves of the file.

The objects dialog is mighty quick, just one click for each group. Try it :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 10 guests