layer, sublayer and z-order

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

layer, sublayer and z-order

Postby brynn » Thu Jul 19, 2012 2:35 am

Hi Friends,
I have a large complex image with many layers and sublayers. Sometimes, I'll have an object in a sublayer, which lies on top of an object in the parent layer. I can't get it to move below the object in the parent layer. But I have other examples where the object in the sublayer is below the object in the parent layer, as I expect.

Can someone explain how this happens? I'd be glad to submit the image, but it's rather large. Hhhmmm....maybe I'll look at the XML Editor to see if there's a clue there. Although that will probably confuse me more, lol. Anyway, I'd like to understand how this happens.

Thanks :D

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: layer, sublayer and z-order

Postby flamingolady » Thu Jul 19, 2012 3:59 am

Well, I certainly can't explain it either, but I'm interested in this subject because I've had similar issues. I'm pretty much to the point that I no longer use sublayers because something goofy always happens.
dee

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: layer, sublayer and z-order

Postby druban » Thu Jul 19, 2012 10:39 am

brynn wrote:I have a large complex image with many layers and sublayers.
Lucky you! Always wanted one of those myself! :lol:

brynn wrote:Sometimes, I'll have an object in a sublayer, which lies on top of an object in the parent layer. I can't get it to move below the object in the parent layer. But I have other examples where the object in the sublayer is below the object in the parent layer, as I expect.

Hi Brynn, while we wait for a more technical answer, here's my quarter: you are observing a slight limitation of the group/layer concept. Although you can change the stacking order of sublayers, relative to each other, you can't make it move relative to non sublayer elements of the layer, i.e. groups and objects. However, if a move relative to other sublayers is possible, then it will also take into account groups and objects.
Oh wow, it sounds confusing even to me!

Let's try some examples and see if I can be clearer.
Let's say you have a layer with some objects, groups and a single sublayer containing more objects. There is no way - from the layers dialog (at least in my version) to move this sublayer up or down. The only way to reorder the objects in the parent layer is to change the z order of the other objects, by selecting them and using the control bar or key shortcuts to move them up and down, and in that case the entire sublayer is considered in the layering order as a single group. All this because you can't select the sublayer on the canvas. (You CAN select it in the XML and use the up and down arrows to move it in the draw order, one line/object at a time. Note that moving it up moves it down in the list, i.e.draws it later.)

But if you create another sublayer, everything changes! Well, not everything - you still can't select a sublayer with the selector. But you can use the up and down keys in the layers dialog box to move sublayers relative to objects and groups - one at a time, or all the way to the top or bottom - AS LONG AS A MOVE RELATIVE TO THE OTHER SUBLAYER IS POSSIBLE.

Well, i guess that's really all of it. Not so bad, really.
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: layer, sublayer and z-order

Postby brynn » Fri Jul 20, 2012 2:49 am

Oh gosh, druban, I don't understand what you're trying to say! I don't need to move an entire sublayer. Just one object in the sublayer, compared to one object in the parent layer. But you have reminded me, as I often forget, layers are really groups, and sublayers (I guess) are like nested groups. Maybe that perspective will lead me somewhere....although I can't get out my image and look at it, until later tonight.

Thanks :D

Edit
Actually, ~suv gave me instructions for making a sublayer into a regular layer, some time ago. I haven't actually done that yet (different image from this one). But anyway, this is just about single objects.


Return to “Help with using Inkscape”