I’m not sure if this is the right place to ask, but I have the following issue and I’m not sure if it is supposed to work that way:
I have a document with nested layers, let’s say
+ Layer A | +- Layer B | +- Layer C + Layer D +- Layer E
For editing purposes, only layer A and B are visible, C, D and E are hidden.
If I now use the command line interface of Inkscape to export the image in various configurations, I do the following:
select-all:layers; selection-hide; select-clear select-by-id:D selection-unhide select-by-id:E selection-unhide
and then export as png...
Through this I want to initially hide *ALL* layers and only turn on the layers I want. But apparently, select-all:layers only selects the topmost layers A and D, but does not change the settings for B, C and E.
I know that nested layers were only introduced later, could it be that select-all:layers was never updated to reflect this? Or would a new option for select all (e.g. select-all:nested-layers, or select-all:layers:depth=... ) be a sensible option?
My main point is: I want to be able to switch on individual layers (because I know their ID), but I want to be able to switch off *ALL* layers before doing so, without knowing all their IDs. And I don't want to store the original SVG with all layers switched off, because in editing, I usually have some of the layers switched on (latest/last configuration I’m currently working on).
No idea whether this is a bug or not, but win.layer-hide-all should do what you need.
Maren
Am 30.09.24 um 09:49 schrieb Alexander Roalter:
I’m not sure if this is the right place to ask, but I have the following issue and I’m not sure if it is supposed to work that way:
I have a document with nested layers, let’s say
- Layer A
| +- Layer B | +- Layer C
- Layer D
+- Layer E
For editing purposes, only layer A and B are visible, C, D and E are hidden.
If I now use the command line interface of Inkscape to export the image in various configurations, I do the following:
select-all:layers; selection-hide; select-clear select-by-id:D selection-unhide select-by-id:E selection-unhide
and then export as png...
Through this I want to initially hide *ALL* layers and only turn on the layers I want. But apparently, select-all:layers only selects the topmost layers A and D, but does not change the settings for B, C and E.
I know that nested layers were only introduced later, could it be that select-all:layers was never updated to reflect this? Or would a new option for select all (e.g. select-all:nested-layers, or select-all:layers:depth=... ) be a sensible option?
My main point is: I want to be able to switch on individual layers (because I know their ID), but I want to be able to switch off *ALL* layers before doing so, without knowing all their IDs. And I don't want to store the original SVG with all layers switched off, because in editing, I usually have some of the layers switched on (latest/last configuration I’m currently working on).
participants (2)
-
Alexander Roalter
-
Maren Hachmann