Author Topic: SVG and layers, help please.  (Read 8266 times)

July 19, 2016, 09:30:54 AM
Read 8266 times

2cay2

  • Sr. Newbie

  • Offline
  • **

  • 5
Hi, hope someone can help me..

I was working on a image with several layers which I had named individually. I saved as a svg and when I imported it to carry on working on it all my layers had gone in the layers menu and defaulted to just one layer.
The layers are still there, I can drag them about, but I can't toggle through them like I could before I saved it.

I have looked everywhere and can't find anything to explain this, or how to get my layers back in the layers menu. Can anyone help please? May be I need to save it or open it in a different way?

 :th:
« Last Edit: July 21, 2016, 03:18:50 PM by Lazur »

July 19, 2016, 03:35:30 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to Inkscape Community!

Let's gather some more information, before we can give proper suggestions.  You said:

Quote (selected)
I saved as a svg and when I imported it...

What program did you import into?  Or do you mean that you saved, and just opened it again in Inkscape, later?

If we were talking about Inkscape, there are a couple of things that can cause the contents of more than one layer to be combined into 1 layer.  However, the layers that you named would still be there.  They would be empty, but they would still be there.  So for that reason, I think you might have imported the SVG into another program.

I guess when we consider that Inkscape doesn't have real layers, it's not surprising that there's a problem importing layers into other programs.  If I recall correctly, the reason Inkscape doesn't have traditional layers, is because there's not an SVG standard for it.  (SVG standards are the rules, or codes, that define SVG images.)  Inkscape layers are actually special Groups.  So I think that's what you're seeing, when you say you can still move the layers around, but they aren't in the list of layers in the other program.

That might be a good sign though, if you can still select the content of the layers individually.  Theoretically, it seems like you might be able to create new layers in that other program, and move the content into the new layer.  But without knowing what the other program is, I can only guess.  Well, even knowing what the program is, it's likely that I've never used it.  But someone here might have used it, and could try to help.

If you can't make the new layers or move the content to the new layers, for some reason, there still might be some other things you can do, while the file is still in Inkscape.  Please tell us what the other program is, and that will be a good place to start.  :)
« Last Edit: July 21, 2016, 03:19:09 PM by Lazur »
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 19, 2016, 03:53:34 PM
Reply #2

2cay2

  • Sr. Newbie

  • Offline
  • **

  • 5
Hi, thanks for the reply. It's late here and I'm off to bed now, so I wont be able to reply again for some time if you have more questions - wont be ignoring you :)
Anyway, to clarify I saved what I was working on (in Inkscape) and just opened it again in Inkscape. I am new to Inkscape and vectors etc so I may be describing things poorly. I have a basic and probably flawed understanding of what I'm trying to do!
What I would like is when I open it again in Inkscape that I can continue working on it as it was previously. But the layers that I was using in the layers menu, have disappeared. I just have one layer showing called 'Layer 1', instead of the various layers that I had named before. Is there any way I can get them back? I wanted to be able to toggle through the layers like I could before saving.
Not sure if I'm explaining very well. I can grab screen shots tomorrow if that will help?
« Last Edit: July 21, 2016, 03:19:27 PM by Lazur »

July 19, 2016, 07:01:18 PM
Reply #3

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Don't worry.  We might miss each other, but the messages will stay here.

Hhmm, all in Inkscape.  Ok. 

I wonder if there's a chance you have more than one version of this image?  Have you had any crashes, where Inkscape told you it had saved a backup?

Yes it is possible that I've misunderstood.  So we'll get really specific now.  When you gave names to your layers, were you using the Layers dialog, which is Layers menu > Layers (or by clicking this icon/button :lay: )?  Then you click the blue plus sign ( :lay+: ) to add new layers?  If that's how you did it, then all those layers should still be there, with the names you gave them, unless you deleted them by clicking the blue minu sign ( :lay-: ).

That's how it's supposed to work.  The layers will be there, no matter how many times you save or open or close the file.  So I wonder if the layers might have been lost in a crash.  Or maybe you just have 2 versions of this file, for some reason?

When you say you toggled through the layers....it makes me wonder....  In the Layers dialog (sorry for my ugly window color - it's easy on my eyes):

lad.png
*lad.png
(8.56 kB . 220x326)
(viewed 2413 times)


you can just click on each layer, so it's not exactly like toggling.  So I wonder if you're using "layer" to describe what's known as "z-order".  When you have several objects all stacked up on top of each other, the order from top to bottom is called "z-order".  And selecting objects according to the z-order, it is like toggling.  It's holding the Alt key, and click on the top object.  Keep holding the Alt key and click again, and it selects the next object down the stack in the z-order.  And as long as you hold the Alt key, every click will select the next object below the one that was selected before, until you get to the bottom, then the next click selects the top one again.

Wait, which version of Inkscape are you using?  There's a new feature in the development version (I'm pretty sure) which would be.....well I can't find it's exact version number, but it will be something like 0.92pre1 or 0.92pre2.  If you're using a dev version, you might have the new Object Manager, which looks similar to the Layers dialog, except with a lot more little buttons in it.

And....well I probably should have thought of this first ( :-P ).  If by chance, when you created your new layers, you made them to be sub-layers of Layer 1, then they may all be still there.  Look for a tiny plus sign (+) which is inside of a tiny square, right in front of "Layer 1" in the Layers dialog.  Click on that, and all your layers will expand down below "Layer 1".  If it's not there, we still have some work to do.  But based on all the info, this seems like the most likely possibility.

I probably won't be back myself, until around this time tomorrow.  So I might miss you again.  But leave me a message answering my questions, or tell me if you found the layers as sub-layers.  And we'll go from there.  :)
« Last Edit: July 21, 2016, 03:19:42 PM by Lazur »
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 20, 2016, 06:59:01 AM
Reply #4

2cay2

  • Sr. Newbie

  • Offline
  • **

  • 5
I thought it would be easiest to answer your questions by quoting you and answering in blue. Hope that's ok.

After reading through your reply I am wondering if I have some sort of glitch going on. I thought it was odd that my layers are disappearing on import, it didn't seem right, so I think I will try a few things with that in mind while I wait for your next reply.

Thanks so much for your help. I really appreciate it :)




Hhmm, all in Inkscape.  Ok. 
Yep

I wonder if there's a chance you have more than one version of this image?  Have you had any crashes, where Inkscape told you it had saved a backup?
I just have the original jpeg that I'm copying from and the file I've saved in Inkscape. I did have a crash, but I imported the file I'd saved.

When you gave names to your layers, were you using the Layers dialog, which is Layers menu > Layers (or by clicking this icon/button :lay: )?  Then you click the blue plus sign ( :lay+: ) to add new layers?  If that's how you did it, then all those layers should still be there, with the names you gave them, unless you deleted them by clicking the blue minu sign ( :lay-: ).
Yes, this is how I did it. I didn't delete them. I saved the file but on importing it the layers are gone and I just have 'Layer 1' nothing else.

That's how it's supposed to work.  The layers will be there, no matter how many times you save or open or close the file.  So I wonder if the layers might have been lost in a crash.  Or maybe you just have 2 versions of this file, for some reason?
It did crash on me but I imported a file I'd saved before the crash. Also I've saved and imported other files when it hasn't crashed, but always the same issue.

When you say you toggled through the layers....it makes me wonder....  In the Layers dialog (sorry for my ugly window color - it's easy on my eyes):

 [ Invalid Attachment ]


you can just click on each layer, so it's not exactly like toggling.  So I wonder if you're using "layer" to describe what's known as "z-order".  When you have several objects all stacked up on top of each other, the order from top to bottom is called "z-order".  And selecting objects according to the z-order, it is like toggling.  It's holding the Alt key, and click on the top object.  Keep holding the Alt key and click again, and it selects the next object down the stack in the z-order.  And as long as you hold the Alt key, every click will select the next object below the one that was selected before, until you get to the bottom, then the next click selects the top one again.
Sorry, the terms I use are probably wrong! I know what I mean, just not using the right words to explain oops! For toggling I meant moving about the layers, like in the image your showing. Turning on and off visibility of layers or moving them up or down etc. I've not heard of z-order before, but I get what you mean about the stacking of objects, and no, that's not what I meant when I was talking about toggling.

Wait, which version of Inkscape are you using?  There's a new feature in the development version (I'm pretty sure) which would be.....well I can't find it's exact version number, but it will be something like 0.92pre1 or 0.92pre2.  If you're using a dev version, you might have the new Object Manager, which looks similar to the Layers dialog, except with a lot more little buttons in it.
I have version 0.91, there's no extra buttons, it's just the same as in your image.

And....well I probably should have thought of this first ( :-P ).  If by chance, when you created your new layers, you made them to be sub-layers of Layer 1, then they may all be still there.  Look for a tiny plus sign (+) which is inside of a tiny square, right in front of "Layer 1" in the Layers dialog.  Click on that, and all your layers will expand down below "Layer 1".  If it's not there, we still have some work to do.  But based on all the info, this seems like the most likely possibility.
Nope, not using sub layers

I probably won't be back myself, until around this time tomorrow.  So I might miss you again.  But leave me a message answering my questions, or tell me if you found the layers as sub-layers.  And we'll go from there.  :)
« Last Edit: July 21, 2016, 03:19:56 PM by Lazur »

July 20, 2016, 07:17:20 AM
Reply #5

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
I've frequently had a similar problem in 0.91, with layers vanishing from the layers panel.

What always helped was to restart Inkscape, it seems that's a bug. Unfortunately, I've never been able to pinpoint what is causing it, so I didn't make a bug report.
« Last Edit: July 21, 2016, 03:20:13 PM by Lazur »

July 20, 2016, 07:30:09 AM
Reply #6

2cay2

  • Sr. Newbie

  • Offline
  • **

  • 5
I think I have found the problem!

Moini, this might have been your problem too? Closing and reopening didn't make any difference to me, so it might have been a different issue though?

I don't know if it's a bug or just that I have been doing it wrong, but I have just discovered that if I 'open' the saved sgv file my layers are there. I have been 'importing' the sgv file, when I do that I loose the layers in the menu box. I've tried it several times doing it both ways and it's the same result each time.

So now I know to 'open' my saved sgv files and it will all be there as I left it. Phew!!

Thanks again for your help Brynn. I wouldn't have discovered this without your replies. I probably would have given up to be honest. I simply couldn't find anything about it anywhere and was loosing the will to live  :-P

 :ty1:
« Last Edit: July 21, 2016, 03:20:27 PM by Lazur »

July 20, 2016, 07:33:05 AM
Reply #7

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Glad you solved it :) (but no, unfortunately, mine is a different issue, it's during use of Inkscape that the layers vanish from the dialog)
« Last Edit: July 21, 2016, 03:20:40 PM by Lazur »

July 20, 2016, 10:01:58 AM
Reply #8

2cay2

  • Sr. Newbie

  • Offline
  • **

  • 5
Eek! That sounds frustrating :(

« Last Edit: July 21, 2016, 03:20:51 PM by Lazur »

July 20, 2016, 01:38:37 PM
Reply #9

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Ah, it's not as bad as it sounds. Save, restart, open recently used file. The layers aren't actually gone, they are only no longer visible in the dialog.
« Last Edit: July 21, 2016, 03:21:03 PM by Lazur »

July 20, 2016, 01:41:58 PM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Well, I'm glad you solved it  :tup:

But I don't understand what you mean about importing the file.  Do you  mean that you open Inkscape, and then File menu > Import?  The proper way to open an SVG file, is File menu > Open (or the button on the command bar or open directly from your file manager (Windows Explorer probably).  Importing is used to bring files into Inkscape, which Inkscape can't open -- typically it's imported raster images (JPG, PNG, etc.)

I'll test....
Omg, yes, I have the same experience!  I suppose this could be a bug.  But importing is not the proper way to open an SVG file.  So given it's not appropriate, it might not really be considered a bug.  I think I'll ask on the mailing list about this, just for my own info learning more about "bugs" in general.

Wow  :lol:  So it's an easy solution for you, and you learn  more along the way!  I'm glad we could help   :D
« Last Edit: July 21, 2016, 03:21:17 PM by Lazur »
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 20, 2016, 01:43:34 PM
Reply #11

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, since you're here right now, Moini, what do you think?  Would this be called a bug, since importing an SVG file isn't the proper way to open a file?  Or is there some use for importing an SVG file that I've never learned yet?
« Last Edit: July 21, 2016, 03:21:33 PM by Lazur »
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 21, 2016, 02:26:13 PM
Reply #12

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Not sure - I guess it would be more of a feature request to keep layers of imported objects intact. They could be added as sub-layers of the current layer. OTOH, this could be confusing to people... Maybe as a setting that the user can choose to make ('keep layers of imported Inkscape SVG images as sublayers of current layer')? I bet there's already a report for this, but I can't spend time on searching now.
« Last Edit: July 21, 2016, 03:21:45 PM by Lazur »

July 21, 2016, 03:23:36 PM
Reply #13

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Off-Topic: show
Just edited the topic title to svg from sgv if anyone wonders about those editing notes.

July 21, 2016, 04:07:42 PM
Reply #14

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Off-Topic: show
Hah, I never even noticed!  Thanks Lazur!


Thanks Moini!  Maybe I'll post on the users list about, and ask what should happen, if anything.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

July 21, 2016, 10:59:20 PM
Reply #15

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yes, it has already been reported:  https://bugs.launchpad.net/inkscape/+bug/502075

Apparently there is some need to import SVG files.  I didn't see the reason explained there.  But it was being discussed as if it matters.  And I saw a few other bug reports about importing SVG files.

The report indicates a workaround, to make the layers appear in the dialog.  But in this case, I think simply opening the file, instead of importing, is the best solution.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann