Jump to content
Jinja

Affinity overwrites Inkscape labels

Recommended Posts

Posted (edited)

I'm reviewing Affinity Designer with the hope that it can be used in our asset creation process. I'd like to be able to use it in conjunction with Inkscape, that is, load up an SVG in either InkScape or Affinity and leverage the power of both apps. However, when I export from Affinity, it strips out the inkscape xml tags. Unlike Inkscape, which maintains any Affinity xml tags. I need to store information in group labels for my own application which uses labels to store meta information about that group (e.g if I store "chance=100" in the group label, then that group has a 100% chance of appearing in my own application). Let me provide an example...

I create a group within Inkscape, and I change it's label to be chance=100. When I save the SVG will contain something like this...

<g id="g963" inkscape:label="chance=100"><path id="path93" ...

When I load that in to Affinity, it labels the group "chance=100", which I wasn't expecting. It means it utilized the inkscape label. However, when I export this as an SVG I get the following...

<g id="chance-1004" serif:id="chance=100"><path id="path93" ...

Now I can see what's happened here, but I don't like it. Affinity has changed the id of my group! Instead of using "g963" which is a perfectly fine unique number generated by Inkscape, it has utilized the inkscape:label as the id. But there's a problem, a lot of the inkscape:labels are the same (because it's meta data, not a unique id) so Affinity has to append a digit to make the id unique, hence "chance-1004".

Is there a way to get Affinity to ignore and maintain xml attributes that don't belong to it and to maintain/not alter the xml tags that belong to the SVG standard? (It's free to add any serif attribs as Inkscape maintains and ignores them)

Side note, is there a way to add/change this "serif:id" xml attribute that Affinity has generated above from within the Affinity Designer app? When I right click a group in the layers window, I don't see any way to edit it.

Thanks for any help.

p.s. I'm using Windows.

Edited by Jinja

Share this post


Link to post
Share on other sites

I tried storing my data in the group's title and the group's description, which creates child tags in the XML, but both of those are stripped out by Affinity also.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×