GIMP XCF export doesn't preserve layer names

Bug #168250 reported by Secundar
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
jazzynico
Fedora
New
Undecided
Unassigned

Bug Description

The python script writes to the /tmp directory as it assembles the xcf.
When you open the xcf the layer names include that path -- not just the
layer name from inkscape. Kinda messy.

Revision history for this message
Horkana-users (horkana-users) wrote :

Originator: NO

All this script/extension/plugin does is automate the process of opening a
SVG file in the gimp and then saving it again as XCF, it is just a
convenience. GIMP can import SVG and will give you many more options on
how to control the input. I would strongly recommend you use that method
instead.

Revision history for this message
Bug Importer (bug-importer) wrote :

importing directly into gimp cannot a) render with the inkscape renderer
or b) separate the image into layers based upon inkscape's layers.

Revision history for this message
Aaron C Spike (acspike) wrote :

Originator: NO

The script automates the process of exporting every layer from inkscape as
a png and importing those layers into gimp. And now it does so without all
of the clutter in the layer names. Please grab the updated copy of the
script and test.

http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/share/extensions/gimp_xcf.py?view=markup

Revision history for this message
Horkana-users (horkana-users) wrote :

Originator: NO

I'm amazed the GIMP importer doesn't include an option to render groups as
seperate layers (inkscape layers are just a special kind of groups) I would
have sworn it did.

The renderer issue you mention is a good point though.

Thanks for the update Aaron.

Revision history for this message
Secundar (secundar) wrote :

Originator: YES

Latest update no longer prints *full* path of temp files as the layer
name. However, now we are missing the actual Inkscape layer names, e.g.
they are rewritten as "Layer 1"... "Layer 2" and so on.

Revision history for this message
Secundar (secundar) wrote :

Originator: YES

I also received the following errors in the Inskape dialog yet the file
was successfully created (7 layers)...

** (inkscape:5837): WARNING **: Format autodetect failed. The file is
being opened as SVG.

(inkscape:5837): Pango-WARNING **: Error loading GPOS table 4097

(inkscape:5837): Pango-WARNING **: Error loading GPOS table 4097

** (inkscape:5838): WARNING **: Format autodetect failed. The file is
being opened as SVG.

(inkscape:5838): Pango-WARNING **: Error loading GPOS table 4097

(inkscape:5838): Pango-WARNING **: Error loading GPOS table 4097

** (inkscape:5848): WARNING **: Format autodetect failed. The file is
being opened as SVG.

(inkscape:5848): Pango-WARNING **: Error loading GPOS table 4097

(inkscape:5848): Pango-WARNING **: Error loading GPOS table 4097

** (inkscape:5849): WARNING **: Format autodetect failed. The file is
being opened as SVG.

(inkscape:5849): Pango-WARNING **: Error loading GPOS table 4097

(inkscape:5849): Pango-WARNING **: Error loading GPOS table 4097

** (inkscape:5854): WARNING **: Format autodetect failed. The file is
being opened as SVG.

(inkscape:5854): Pango-WARNING **: Error loading GPOS table 4097

(inkscape:5854): Pango-WARNING **: Error loading GPOS table 4097

** (inkscape:5855): WARNING **: Format autodetect failed. The file is
being opened as SVG.

(inkscape:5855): Pango-WARNING **: Error loading GPOS table 4097

(inkscape:5855): Pango-WARNING **: Error loading GPOS table 4097

** (inkscape:5856): WARNING **: Format autodetect failed. The file is
being opened as SVG.

(inkscape:5856): Pango-WARNING **: Error loading GPOS table 4097

(inkscape:5856): Pango-WARNING **: Error loading GPOS table 4097
No batch interpreter specified, using the default
'plug_in_script_fu_eval'.

Inkscape 0.45+devel, built Jan 25 2007 (autopackage)
Gimp 2.2.11 on Ubuntu 6.06

Revision history for this message
Horkana-users (horkana-users) wrote :

Originator: NO

Aaron warned there would be spurious error messages, but if the image is
created dont worry about it.

> The renderer issue you mention is a good point though.

what I neglected to mention is that although we would hope the inkscape
renderer is the best but as you can see from the bug tracker that isn't
always the case.

Bryce Harrington (bryce)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I'm changing the summary of this bug to avoid opening a new one.
The original issue (image path as layer name) was solved but the original layer names aren't preserved (they are renamed as layer1, layer2 and so on).

su_v (suv-lp)
tags: added: exporting layers xcf
removed: all-platforms saving
Revision history for this message
jazzynico (jazzynico) wrote :

The script uses the id attributes, and Inkscape shows the inkscape:label attribute in its UI.
Patch in progress.

Changed in inkscape:
assignee: Aaron C Spike (acspike) → JazzyNico (jazzynico)
milestone: none → 0.49
status: Confirmed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

First test file.
The layer name uses the original label, or, if the attribute doesn't exists, the layer id.

Revision history for this message
jazzynico (jazzynico) wrote :

Known bug: the export doesn't work if a label contains non-ascii characters...

Revision history for this message
su_v (suv-lp) wrote :

Script from comment #10 tested with Inkscape 0.48+devel 9696 and GIMP 2.6.10 on OS X 10.5.8

Plain (ascii) layer names with or without spaces export to GIMP fine, layer names with e.g. German Umlauts (ä,ö,ü) fail (the PNGs are exported to the tmp folder but no XCF file is created).

The only output I see from GIMP when layer names have non-ascii characters, is:
> batch command executed successfully

Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 9699 (the label needed to be encoded to UTF8).

The file is available on launchpad (http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head%3A/share/extensions/gimp_xcf.py). To test the fix with 0.47 or 0.48, copy the downloaded file to the Inkscape share/extension folder.

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
jazzynico (jazzynico) wrote :

Fix backported to 0.48.x branch (revision 9660).

Changed in inkscape:
milestone: 0.49 → 0.48.1
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.