Scenarios of layers?

Post questions on how to use or achieve an effect in Inkscape.
JFP
Posts: 3
Joined: Wed Oct 08, 2014 3:55 am

Scenarios of layers?

Postby JFP » Wed Oct 08, 2014 4:19 am

Hello guys,

We can choose to hide/show layers, but can we manage some scenarios?

In the context of developping some user interfaces with many icons and menus, having to hide/show icons to simulate different mode of a product is real pain in the ass. But don't get me wrong, inkscape is awsome!

So, pretend you got 10 layers. How could you create a scenario where layer 1 to 5 is showing (scenario A) and layer 6 to 10 is off. Then you got another scenario where layer 6 to 10 is on and layer 1 to 5 is off (scenario B), and mixing altogether, etc. So now you can switch easily between those scenarios, modeling icons at will based on customer demands... and export again and again all those scenarios in png.... can't find that feature?

Please help me to find a solution!

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

Re: Scenarios of layers?

Postby Lazur » Wed Oct 08, 2014 4:48 am

Hi.

You can create sub-layers as well.
Like, an "A" layer with sublayers from 1 to 5, and a "B" layer from 6 to 10.

JFP
Posts: 3
Joined: Wed Oct 08, 2014 3:55 am

Re: Scenarios of layers?

Postby JFP » Wed Oct 08, 2014 5:04 am

Thank you for your quick response.

I am sorry, I used a scenario too much simple, in fact there is a lot of crossed scenarios.

For example :
Scenario A : Layer 1 to 5 = ON
Scenario B : Layer 6 to 10 = ON
Scenario C : Layer 1, 6 , 10 = ON
Scenario D : Layer 2 , 7 , 9 = ON
... and so on.

So the sub layer would not suffice?

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

Re: Scenarios of layers?

Postby Lazur » Wed Oct 08, 2014 5:29 am

Haven't tried it yet, but maybe it is possible to clone complete sublayers, as they are treated as groups in the svg codes.
If not, then there is still the option to clone all the objects from one layer to another.
With the previous example
layer "A" with sublayers 1 to 5,
Layer "B" with sublayers 6 to 10,
Layer "C" with sublayers 1', 6', and 10', where " ' " indicates all objects are cloned from 1, 6, and 10 sub-layers,
Layer "D" with sublayers 2', 7', 9'.

The cloning can be done easier if all the objects on one layer are grouped together into one group.

JFP
Posts: 3
Joined: Wed Oct 08, 2014 3:55 am

Re: Scenarios of layers?

Postby JFP » Thu Oct 09, 2014 2:10 am

Nice! The clone feature will do the job!

Obviously, 'scenarios' isn't a feature integrated in inkscape. Eventually, I will post it as a requested feature to remember settings (on/off, opacity) based on scenarios you create.

I appreciate your time, thank you Lazur!

[edit]
* Need to say that cloning a layer or sub-layer is not a feature yet. It has been requested long time ago, but still not implemented!

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

Re: Scenarios of layers?

Postby brynn » Thu Oct 09, 2014 7:38 am

But I have a file, made by....tomh, iirc, with cloned layers, to make a kaleidoscope type of images. I've never looked to see how it's made, but I'll attach the file. Maybe you can figure it out :D
Attachments
Copy of Kaleidoscope.svg
(14.4 KiB) Downloaded 142 times

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

Re: Scenarios of layers?

Postby Lazur » Thu Oct 09, 2014 9:45 am

xlink:href="#EDIT"
did the trick in the codes, "EDIT" was the id of the parent layer.
Looking at it in practice it cannot fulfill the "scenario" need, because when the parent layer is hidden, all the clones will be hidden too.
So grouping objects and cloning those is the easy go.


Return to “Help with using Inkscape”