Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the <g> Layer ID to the Inkpad LayerName, not "Layer_1", "Layer_2" etc on SVG export #90

Closed
JohnDuke37 opened this issue Mar 3, 2014 · 7 comments

Comments

@JohnDuke37
Copy link

When exporting an Inkscape file to SVG, the layers are renamed to "Layer_1", "layer_2" etc. rather than using the inkscape layer name. The Inkscape layer name is stored as metadata that is ignored by all other Vector graphics programs such as Illustrator.
Please, please just set the ID to the inkscape layer name! If you need to, append an "_1", "_2" to each name to keep them unique.

You will be saving the sanity of many armchair Inkpad lovers like myself!

Example: (please note that I swapped out the GreaterThan and Lessthan with [ and ] so this would post)

How it works now:
[g id="Layer_2" inkpad:layerName="Left leg"]

How it should work:
[g id="Left leg" inkpad:layerName="Left leg"]

@rhcad
Copy link
Collaborator

rhcad commented Apr 15, 2014

Two layers can have the same name in Inkpad now. So the Layer ID will not be uniqued.

@JohnDuke37
Copy link
Author

Thanks! This is fantastic news for anyone that uses Inkpad and Illustrator!

Sent from my iPad

On Apr 15, 2014, at 9:04 AM, "Zhang Yungui" [email protected] wrote:

Two layers can have the same name in Inkpad now. So the Layer ID will not be uniqued.


Reply to this email directly or view it on GitHub.

@rhcad
Copy link
Collaborator

rhcad commented Apr 16, 2014

Oh, it's not a news yet! I am referring that if the request of you mentioned implemented, the above problems will exist, so it can not be determined implementing the demand. So, either not allow layers of the same name, or allow the same Layer ID in SVG.

@sprang
Copy link
Owner

sprang commented Apr 17, 2014

We could just unique the layer names. So, if you have two layers named "foobar", one becomes "foobar_1". We'd also have to check the SVG spec to see what the rules are for ID strings. It's possible a user editable string wouldn't be a valid ID name for reasons other than uniqueness.

@JohnDuke37
Copy link
Author

Absolutely - this would do it.

  1. Use the Inkpad layer name and append a digit to keep is unique as necessary.

@svachalek
Copy link
Collaborator

(delurking)

The spec for id attributes:
http://www.w3.org/TR/2008/REC-xml-20081126/#NT-Name

On Fri, Apr 18, 2014 at 2:33 PM, JohnDuke37 [email protected]:

Absolutely - this would do it.

  1. Use the Inkpad layer name and append a digit to keep is unique as
    necessary.


Reply to this email directly or view it on GitHubhttps://github.com//issues/90#issuecomment-40846482
.

@rhcad
Copy link
Collaborator

rhcad commented Apr 20, 2014

Realized it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants