locking layers

Post questions on how to use or achieve an effect in Inkscape.
pete
Posts: 6
Joined: Thu Dec 17, 2015 11:26 am

locking layers

Postby pete » Thu Dec 17, 2015 11:32 am

Hi, I am new to inkscape. From other programs I learned that locking a layer (click on the lock in the layer list) the objects in that layer will not be manipulated what ever I do to other layers. In my version 0.91 this is not the case. Although I lock the layer, hide the layer, work in a different layer, come back and show the locked layer ... this still locked layer got the same treatment as the unlocked. I find this very unituitive. Can one change this behavior in the settings?

cheers

Lazur
Posts: 4705
Joined: Tue Jun 14, 2016 10:38 am

Re: locking layers

Postby Lazur » Thu Dec 17, 2015 5:01 pm

Hi.

I'm pretty sure it works as expected: if you lock a layer, objects inside cannot be selected.
My guess would be your objects you could select are not on the locked layer.

So unlock all layers, select object you want to keep, move it to that separate layer (Shift+PgUp/Shift+PgDown) then lock that layer.
If you were locking the layer while the object still selected, then it will remain selected though, but once you deselect it after, you cannot select it again.

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

Re: locking layers

Postby brynn » Thu Dec 17, 2015 5:39 pm

I haven't tested this, but if you put clones in a locked layer, I wonder if manipulating the parent object would affect the clones in the locked layer?

If you can share your SVG file, we can look at it and tell you where things went wrong. Without your SVG file, or detailed info about it, we can only guess. Probably the objects were not in the layers you thought they were. But you never know. After 8 years learning and using Inkscape, there's still a lot more I could learn! I still learn new things almost every day.

I'll test the clones issue that I wondered about above....

Edit
Ok. If you put clones in a locked layer, while the parent object is not in a locked layer, then when you edit the parents, the clones are changed just the same way, even though they are in a locked layer.

Beyond that....maybe an LPE, like pattern along path with linked behavior....or maybe linked offsets. Those both probably behave the same way if their linked object is in the locked layer, and the original is not -- so that you can edit the original, and the linked object in the locked layer changes too.

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

Re: locking layers

Postby Xav » Thu Dec 17, 2015 5:47 pm

Lazur URH wrote:If you were locking the layer while the object still selected, then it will remain selected though...


That was the behaviour in 0.48. In my copy of 0.91, at least, it's a little different. Locking via the button in the Layers dialog also de-selects the currently selected objects, however locking via the menu (an option that wasn't available in 0.48) does still leave the objects selected.

brynn wrote:I haven't tested this, but if you put clones in a locked layer, I wonder if manipulating the parent object would affect the clones in the locked layer?


It does, and it should. You can't manipulate the clone itself (e.g. move, rotate, scale) once the layer is locked, but any changes to the clone's "parent" object will still be reflected in the clone.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Lazur
Posts: 4705
Joined: Tue Jun 14, 2016 10:38 am

Re: locking layers

Postby Lazur » Thu Dec 17, 2015 6:44 pm

Xav wrote:
Lazur URH wrote:If you were locking the layer while the object still selected, then it will remain selected though...


That was the behaviour in 0.48. In my copy of 0.91, at least, it's a little different. Locking via the button in the Layers dialog also de-selects the currently selected objects, however locking via the menu (an option that wasn't available in 0.48) does still leave the objects selected.


Tested again.
It deselects only if you had selected the object with the node tool, but not always in object select mode. Not sure what it depends on though but could experience no deselecting too a few times.

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

Re: locking layers

Postby Moini » Thu Dec 17, 2015 10:10 pm

Sometimes, the current layer isn't displayed correctly (at least I experience this quite often, the layers dialog doesn't always seem to update correctly in 0.91). That could also cause someone to think the object is in a different layer than where it actually is. The layer info in the status bar at the bottom seems to always be correct, though.
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)

pete
Posts: 6
Joined: Thu Dec 17, 2015 11:26 am

Re: locking layers

Postby pete » Thu Dec 17, 2015 10:23 pm

Thanks for the hints. How do I unclone the objects? ... obviously apart from making separate files for each icon ...
Here is my file:
Attachments
icons-deutsch.svg
(134.66 KiB) Downloaded 283 times

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

Re: locking layers

Postby Xav » Fri Dec 18, 2015 6:36 pm

pete wrote:Thanks for the hints. How do I unclone the objects? ... obviously apart from making separate files for each icon ...
Here is my file:


Edit > Clone > Unlink Clone.

But a random checking of a few of your layers hasn't revealed any clones yet, with locking behaving as I would expect. Are you having problems with specific layers, or with all of them? If it's the former, can you let us know which ones. If it's the latter, then I doubt the problem is related to clones.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

pete
Posts: 6
Joined: Thu Dec 17, 2015 11:26 am

Re: locking layers

Postby pete » Sat Dec 19, 2015 7:22 am

Thanks for the unclone hint, but I am afraid that does not help.

I still can reproduce the effect of unwnated objects manipulated with these steps:
- open the file
- unlock the top layer
- unlock "diler-icon-deutsch-berufswelt" and all its sublayers via the lock in the layer list
- show "diler-icon-deutsch-berufswelt" via the eye in the layer list
- draw a rectangle over the suitcase and banknotes to select the icon with the "choose object (F1)" tool
- grap the upper left arrow and scale down the size by about 50% or more
- show "diler-icon-deutsch-computer-medien" via the eye in the layer list

That "diler-icon-deutsch-computer-medien" (and all other icons as well) was the normal size but now has the same size as the manipulated icon despite the layer and its sublayers were hidden and locked. That is most unintuitive I would say as a newbie.

Now if that is how inkscape works what is the workflow to work around that issue?

Thanks for your patience.

pete
Posts: 6
Joined: Thu Dec 17, 2015 11:26 am

Re: locking layers

Postby pete » Sat Dec 19, 2015 7:33 am

Another effect I do not understand is:
- open the layer "deutsch" with the + in the layer list
- show "diler-icon-deutsch-miteinander-reden" via the eye in the layer list
- move that layer above the the layer "deutsch" in the layer list

Why do those steps change the size of the icon?

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

Re: locking layers

Postby Moini » Sat Dec 19, 2015 8:00 am

The locking-unlocking-selecting works as expected for me - Inkscape 0.91 on Linux Mint 17.2.

That "diler-icon-deutsch-computer-medien" (and all other icons as well) was the normal size but now has the same size as the manipulated icon despite the layer and its sublayers were hidden and locked. That is most unintuitive I would say as a newbie.


The size change you see is probably due to a transformation applied to the layer 'deutsch' (you must have resized the document at some point of time), and it no longer being applied to its sublayer when it was moved out of the layer group.

I don't know if this is a known bug. It seems it can only be triggered by drag-and-dropping, the up and down arrows don't allow moving a sublayer in this way. You could have a look at the bug report section on launchpad to determine if this is already known, and if it's not (or you can't find anything like that) file a bug report. (https://bugs.launchpad.net/inkscape)
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)

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: locking layers

Postby ~suv » Sat Dec 19, 2015 9:36 am

Moini wrote:The size change you see is probably due to a transformation applied to the layer 'deutsch' (you must have resized the document at some point of time), (…)
The layer has a scale() transformation which is never added by resizing the page to drawing or content or any other option available in the Document Properties dialog. Apart from scaling which may happen e.g. when importing foreign vector formats (PDF, Postscript), it is basically impossible to _scale_ a layer group in Inkscape using the regular GUI - i.e. without tinkering with XML Editor or external editing. AFAICT the scale factor (0.83333333) does not originate from a PDF import (that produces a different scale (1.25), combined with a vertical flip) - I don't have a idea at the moment how the layer ended up with this kind of transformation.

Moini wrote:(…) and it no longer being applied to its sublayer when it was moved out of the layer group.

I don't know if this is a known bug. It seems it can only be triggered by drag-and-dropping, the up and down arrows don't allow moving a sublayer in this way.
It is a known symptom / bug, filed for the more commonly encountered issue with shifted (a translate() transformation) parent layers:

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

Re: locking layers

Postby Xav » Sat Dec 19, 2015 9:37 am

There's certainly some odd behaviour going on. In 0.48 it all works as you expect; the problems only seem to be present in 0.91. Unlocking some of the layers and selecting some of the content shows "Group of 14 objects in root" in the status bar, regardless of what you select. Double-clicking to enter the group then shows "Group of x objects in layer deutsch", which is more like what I would expect to see.

SVG has no concept of layers, so Inkscape implements them as groups with some additional metadata. The problem seems to be that Inkscape is interpreting your objects as simultaneously being both in layers and in a group at the root level of the XML. When your edits affect the 14 objects in the root group, any changes are affecting them all, even if they're not visible.

Did this file originate in Inkscape or have you imported it from another program? If it's been entirely created in Inkscape, was the same version used for all of it? (E.g. did you start it in a development version, then later upgrade to 0.91?) At this point it might also be useful to know what your OS is, and where you got your copy of Inkscape from.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

pete
Posts: 6
Joined: Thu Dec 17, 2015 11:26 am

Re: locking layers

Postby pete » Sat Dec 19, 2015 10:12 am

Thanks a lot for putting that much effort into trying to help me out here ... but with all these weird things going on I cannot imagine any professional working with inkscape despite I read about it. I am more a coder, not a graphics guy but every now and then I need to do some graphics. For the past 10 years I used Illustrator until they got too greedy and Inkscape seemd to be a promising alternative. But so far the level of frustration and time lost working with inkscape even on the simplest shapes and tasks would pay Illustrator for the next 10 years I must admit. I know it is a comunity driven project, but even those working with enthusiasm on the code must realise that you need something intuitive and reliable to break into an area of a giant. I am willing to spend a decent amount of hours of learning no question but when even learning does not help I think there is a major flaw in the system.

In the end maybe it just does not work on windows ...
- win 10
- this file started in 0.91 (from scratch as far as I remember), the layers in this file were part of a bigger file with more nested layers which I had to split up because inkscape got too often hickups when switching layers on/off or un/locking them
- downloaded from https://inkscape.org

Ok, so I assume now this is a known issue in inkscape as ~suv pointed out. How do I work around it?

cheers

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: locking layers

Postby ~suv » Sat Dec 19, 2015 11:26 am

Attached is a cleaned-up version of the file which should neither expose the known bug with layer Dnd if parent layers have preserved transforms attributes, nor the other oddities which were due to the fact that somehow the layer-specific group attributes ('inkscape:groupmode="layer"') had been purged [1] from quite a lot (but not all) nested layer groups.

[1] How that happened - likely when the file was "split up" earlier - is impossible to reconstruct in detail. It might be related to having importing an earlier version of the SVG file into a new drawing, and partially ungrouping the imported drawing. I did not further investigate though.
Attachments
pete-icons-deutsch-NEU.svg
(107.93 KiB) Downloaded 193 times

pete
Posts: 6
Joined: Thu Dec 17, 2015 11:26 am

Re: locking layers

Postby pete » Sat Dec 19, 2015 11:50 am

Thanks a lot for cleaning it up. But how do I do that with the other 10 files I have staring at me? But when copypasting, splitting, merging, ... is not really possible in Inkscape I have to find a different software anyway. Going for a walk now exploring the posibilities ...


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 14 guests