Inkscape->Illustrator, keep layers intact
Hi list!
I usually lurk on inkscape-devel, and this is my first post here.
I'm looking for help with creating multi-layer drawings in Inkscape and opening them in Illustrator while preserving the layer structure, if possible. Any tips?
I use both programs all the time, but usually when I'm going back-and-forth between the two it's something simple - a trace, a single layer, etc., not a multi-layer composition.
Thanks, Chris
SVG itself doesn't actually have layers in the specification. Our layers just are special groups with a little extra info to identify them as layers in Inkscape.
Unless it gets added to the spec or Adobe found it useful to handle our special groups, it isn't likely they will ever support them.
The only possible workaround I can think of (but can't test) would be to save as PDF from Inkscape and see if it ratings the layers that way.
Hopefully someone can prove me wrong on this.
Cheers, Josh On Aug 20, 2013 9:22 PM, "Chris Mohler" <cr33dog@...155...> wrote:
Hi list!
I usually lurk on inkscape-devel, and this is my first post here.
I'm looking for help with creating multi-layer drawings in Inkscape and opening them in Illustrator while preserving the layer structure, if possible. Any tips?
I use both programs all the time, but usually when I'm going back-and-forth between the two it's something simple - a trace, a single layer, etc., not a multi-layer composition.
Thanks, Chris
Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clk... _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
I have Illustrator CS4 installed on my Win7 box. If you set up layers or sub-layers in Inkscape and save it as the default svg file, you can just drop that into Illustrator and your layers will be present. However, Illustrator strips the layer names that one chooses in Inkscape. For instance, if one has a layer in Inkscape called "green" that layer name in Illustrator would be called "layer1". One would have to rename them. Still, the layer structure seems to be there. As far as I can tell, Illustrator must honor the svg2 group structure that Inkscape uses as layers...my guess anyway.
heathenx
Josh Andler wrote the following on 8/21/2013 11:56 AM:
SVG itself doesn't actually have layers in the specification. Our layers just are special groups with a little extra info to identify them as layers in Inkscape.
Unless it gets added to the spec or Adobe found it useful to handle our special groups, it isn't likely they will ever support them.
The only possible workaround I can think of (but can't test) would be to save as PDF from Inkscape and see if it ratings the layers that way.
Hopefully someone can prove me wrong on this.
Cheers, Josh
On Aug 20, 2013 9:22 PM, "Chris Mohler" <cr33dog@...155... mailto:cr33dog@...155...> wrote:
Hi list! I usually lurk on inkscape-devel, and this is my first post here. I'm looking for help with creating multi-layer drawings in Inkscape and opening them in Illustrator while preserving the layer structure, if possible. Any tips? I use both programs all the time, but usually when I'm going back-and-forth between the two it's something simple - a trace, a single layer, etc., not a multi-layer composition. Thanks, Chris ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net <mailto:Inkscape-user@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/inkscape-user
Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clk...
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
It just retains the grouping structure in that case. Awesome that it at least does that... I seem to recall it being less friendly many moons ago (before they went to the CS naming at least).
Cheers, Josh
Cheers, Josh On Aug 21, 2013 9:35 AM, "heathenx" <heathenx@...155...> wrote:
I have Illustrator CS4 installed on my Win7 box. If you set up layers or sub-layers in Inkscape and save it as the default svg file, you can just drop that into Illustrator and your layers will be present. However, Illustrator strips the layer names that one chooses in Inkscape. For instance, if one has a layer in Inkscape called "green" that layer name in Illustrator would be called "layer1". One would have to rename them. Still, the layer structure seems to be there. As far as I can tell, Illustrator must honor the svg2 group structure that Inkscape uses as layers...my guess anyway.
heathenx
Josh Andler wrote the following on 8/21/2013 11:56 AM:
SVG itself doesn't actually have layers in the specification. Our layers
just are special groups
with a little extra info to identify them as layers in Inkscape.
Unless it gets added to the spec or Adobe found it useful to handle our
special groups, it isn't
likely they will ever support them.
The only possible workaround I can think of (but can't test) would be to
save as PDF from Inkscape
and see if it ratings the layers that way.
Hopefully someone can prove me wrong on this.
Cheers, Josh
On Aug 20, 2013 9:22 PM, "Chris Mohler" <cr33dog@...155... <mailto:
cr33dog@...155...>> wrote:
Hi list! I usually lurk on inkscape-devel, and this is my first post here. I'm looking for help with creating multi-layer drawings in Inkscape and opening them in Illustrator while preserving the layer structure, if possible. Any tips? I use both programs all the time, but usually when I'm going back-and-forth between the two it's something simple - a trace, a single layer, etc., not a multi-layer composition. Thanks, Chris
Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance
Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clk...
_______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net <mailto:
Inkscape-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clk...
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clk... _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
On Wed, 2013-08-21 at 12:34 -0400, heathenx wrote:
I have Illustrator CS4 installed on my Win7 box. If you set up layers or sub-layers in Inkscape and save it as the default svg file, you can just drop that into Illustrator and your layers will be present. However, Illustrator strips the layer names that one chooses in Inkscape. For instance, if one has a layer in Inkscape called "green" that layer name in Illustrator would be called "layer1". One would have to rename them. Still, the layer structure seems to be there. As far as I can tell, Illustrator must honor the svg2 group structure that Inkscape uses as layers...my guess anyway.
Illustrator is using the SVG "id" attribute for the group tag which Inkscape set to "layer1". The Inkscape name is in Inkscape's own namespace: "inkscape:label". I don't know why it was decided that Inkscape needed its own label. Using "id" would probably have been a better choice. (This isn't the only place this happens.)
Tav
You're right about that, Tav. I just tested it by changing the id names. I'll have to keep a mental note of this.
Thanks,
heathenx
Tavmjong Bah wrote the following on 8/21/2013 1:50 PM:
On Wed, 2013-08-21 at 12:34 -0400, heathenx wrote:
I have Illustrator CS4 installed on my Win7 box. If you set up layers or sub-layers in Inkscape and save it as the default svg file, you can just drop that into Illustrator and your layers will be present. However, Illustrator strips the layer names that one chooses in Inkscape. For instance, if one has a layer in Inkscape called "green" that layer name in Illustrator would be called "layer1". One would have to rename them. Still, the layer structure seems to be there. As far as I can tell, Illustrator must honor the svg2 group structure that Inkscape uses as layers...my guess anyway.
Illustrator is using the SVG "id" attribute for the group tag which Inkscape set to "layer1". The Inkscape name is in Inkscape's own namespace: "inkscape:label". I don't know why it was decided that Inkscape needed its own label. Using "id" would probably have been a better choice. (This isn't the only place this happens.)
Tav
On Aug 21, 2013, at 10:50 AM, Tavmjong Bah wrote:
Illustrator is using the SVG "id" attribute for the group tag which Inkscape set to "layer1". The Inkscape name is in Inkscape's own namespace: "inkscape:label". I don't know why it was decided that Inkscape needed its own label. Using "id" would probably have been a better choice. (This isn't the only place this happens.)
The initial reason is that the "id" attribute is a special limited attribute. An ID must follow the XML definition http://www.w3.org/TR/2008/REC-xml-20081126/#id
That means they need to be unique per document (btw, an aspect of layers that Adobe and other artistic software does not have) and must consist only of valid 'name' sequences (limited characters, no spaces, etc).
Bug 339660 has a good discussion of various related factors.
"should be okay to name layers with same label" - https://bugs.launchpad.net/inkscape/+bug/339660
We might want to look into tuning up the lable/id synchronization, but need to be careful about introducing unexpected consequences. (Changing behavior in one direction might make Illustrator happier, but at the expense of breaking script/extension compatibility, etc.)
That means they need to be unique per document (btw, an aspect of layers that Adobe and other artistic software does not have) and must consist only of valid 'name' sequences (limited characters, no spaces, etc). ...
We might want to look into tuning up the lable/id synchronization, but need to be careful about introducing unexpected consequences. (Changing behavior in one direction might make Illustrator happier, but at the expense of breaking script/extension compatibility, etc.)
I recall having a discussion about this somewhere with respect to (the lack of) gradient names. My suggestion was that IDs should be derived from Inkscape names using a well defined algorithm that removes invalid characters or maps them to valid ones (e.g. spaces to underscores). If the resultant ID is not unique in the document then a suffix would be appended to force uniqueness.
For example "My Layer" might get an ID of "my_layer", whilst "My Layer!?!" in the same document would get an ID of "my_layer_1".
The problem, of course, is getting this conversion to work everywhere it's needed, including importing files and copy-pasting fragments. But I do think that derving IDs from names would make life a lot easier for anyone who has to subsequently hand-edit files for whatever reason.
As Jon suggested, this could cause issues with any software which expects Inkscape-generated IDs to be in a particular format (e.g. LinearGradient*) . I'm not convinced this would be much of a problem in practice, but I'm not familiar enough with Inkscape extensions, or other third party tools, to know for certain.
Mark
participants (6)
-
Chris Mohler
-
heathenx
-
Jon Cruz
-
Josh Andler
-
Mark Crutch
-
Tavmjong Bah