Been thinking a bit about layers today, especially in light of the RFE that Jonathan put in, and Thorsten's comments earlier. I realized that I'm still wayy too stuck in the Illustrator mindset. They've got the right idea.
Illustrator layers really are just glorified groups. We can do better, and different. It's helpful to look at other tools, and what layers look like in their generalized form.
In many tools, layers are entirely are decoupled from grouping and z-ordering. They basically just let you take slices through "aspects" of the document and work on them in isolation.
For 2d apps, think of GIS databases or KiSS dolls. For 3d apps, Blender or Unigraphics.
I think that's the direction we should go with layers, too. It gives us some really useful functionality we'd otherwise not have.
So, here's the deal, I think:
* we keep the document tree dialog we had been planning, but we don't call it "layers" anymore, and don't try to shoehorn Illustrator-style pseudo-layers on top of it (we'll still have some easy facility for drawing/editing "inside" groups though)
* inkscape:groupmode goes away (bulia has already rendered it obsolete anyway)
* the "layers" dialog is just a list of layers with visibility toggles and buttons to add/remove layers
* an object can be in zero or more layers
* this is determined by the inkscape:layers attribute, which holds a whitespace-separated list of layer IDs (NMTOKENS)
* we'll probably have inkscape:layer elements too, somewhere, to hang per-layer attributes (like descriptive names) on, but layers will fundamentally exist just by virtue of being referenced
* in absence of this attribute, an object is considered to be in the same layer(s), if any, as its parent (this is the default for new objects)
* layer visibility is an Inkscape-specific thing, separate from CSS visibility of individual objects
* objects are visible in the editor iff:
1. their CSS visibility is "visible"
2. at least one layer they're in is visible, or they aren't in any layers
3. their parents are visible by these criteria
* there should be a {select,unselect}-by-layer feature
* there should also be an {add,remove}-selected-objects-to-layer feature
I think that should cover all the bases, and shouldn't require much work to implement. Personal life allowing, I'll take a stab at getting this hammered out by next week.
(no, I've not forgotten about pangoification ... my contribution to that this week will be getting the C++ification stuff documented, time permitting)
-mental
-----Forwarded Message----- From: SourceForge.net <noreply@...34...> To: noreply@...34... Subject: [ inkscape-Feature Requests-857357 ] LAYERS: Various ideas combined Date: Mon, 07 Jun 2004 22:17:17 -0700
Feature Requests item #857357, was opened at 2003-12-10 05:47 Message generated for change (Settings changed) made by bryce You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=604309&aid=857357&...
Category: None Group: None Status: Open Priority: 9 Submitted By: Jonathan Phillips (kidproto)
Assigned to: MenTaLguY (mental)
Summary: LAYERS: Various ideas combined
Initial Comment: Something which I really missed in SVG is the ability to work with layers.
Layers should allow to show and hide all objects in them and it should be possible to change some attribute in all objects of a layer (for example, the line color). Alternatively, it should be possible to select objects by layer - then this can be done manually.
Note that layers are not groups: Objects from different groups can be in the same layer so they move with the other objects in the same group but whether they are visible or not depends on the setting of the layer.
Layers can be used to depth-arrange objects (so when I move a layer in front of some other layer, the objects in the different groups must be reordered accordingly). When a group is in a layer, then all objects in that group are in the same layer.
I'm not sure if it would be a good idea to allow one object to be in different groups (it's visible when at least one of them is visible).
For the implementation: When I did this, I added a x:layer attribute to the elements plus a x:layer-style element to the SVG. Then my XSLT script would select drop all elements of invisible layers and sort the layers according to the depth attribute of the x:layer-style elements.
( NOTE: originally in sodipodi bug tracker as bug(s) # 616232 )
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=604309&aid=857357&...