10-25-2019, 09:28 PM
Well, I began working on a wrapper for the default gimp-vectors-export-to-file, but
-- The option 'export all paths' doesn't work from a plugin, likely for the same reason as the bug in my previous tread
-- Anyway, I wish to export just my 'selected paths', to a single file, and not merged, but as individual paths in a single SVG file.
Well, as can be seen from the attachment, I got 'almost' there by using xml.etree.ElementTree--the trouble is I cannot get it to save to svg without mangling the file by adding a nsO: namespace to every tag.
Inkscape and Chrome can cope with the mangled file, but Gimp CANNOT--and one cannot find fault with that!
Is there some alternative to reprocessing the whole file (maybe as a string?) and removing all those spurious nsO:?
Thanks!
-- The option 'export all paths' doesn't work from a plugin, likely for the same reason as the bug in my previous tread
-- Anyway, I wish to export just my 'selected paths', to a single file, and not merged, but as individual paths in a single SVG file.
Well, as can be seen from the attachment, I got 'almost' there by using xml.etree.ElementTree--the trouble is I cannot get it to save to svg without mangling the file by adding a nsO: namespace to every tag.
Inkscape and Chrome can cope with the mangled file, but Gimp CANNOT--and one cannot find fault with that!
Is there some alternative to reprocessing the whole file (maybe as a string?) and removing all those spurious nsO:?
Thanks!