diff options
| author | Aaron Spike <aaron@ekips.org> | 2008-02-10 20:31:19 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2008-02-10 20:31:19 +0000 |
| commit | 061b306cfeb94a6ec30f6472f3882229ec834924 (patch) | |
| tree | d2c80b3fab39b2f3ea305d72d9e758ae38aa18d6 | |
| parent | Make options in perfect bound cover generator translatable (diff) | |
| download | inkscape-061b306cfeb94a6ec30f6472f3882229ec834924.tar.gz inkscape-061b306cfeb94a6ec30f6472f3882229ec834924.zip | |
Partial fix
This effect is currently broken and stands to be removed from the 0.46 release
I'm committing this partial fix, which updates the script for lxml anyway
The next stage will require updating the script-fu portion of the script to
operate with newer gimps (would be great if it could work with new and old!)
(bzr r4695)
| -rwxr-xr-x | share/extensions/gimp_xcf.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/share/extensions/gimp_xcf.py b/share/extensions/gimp_xcf.py index 998f5d9a1..b7f0ff78f 100755 --- a/share/extensions/gimp_xcf.py +++ b/share/extensions/gimp_xcf.py @@ -26,18 +26,18 @@ class MyEffect(inkex.Effect): pass def effect(self): svg_file = self.args[-1] - node = inkex.xml.xpath.Evaluate('/svg',self.document)[0] - docname = node.attributes.getNamedItemNS(inkex.NSS[u'sodipodi'],'docname').value[:-4] + docname = self.xpathSingle('/svg:svg/@sodipodi:docname')[:-4] #create os temp dir tmp_dir = tempfile.mkdtemp() area = '--export-area-canvas' pngs = [] - names = [] - path = "/svg/*[name()='g' or @style][@id]" - for node in inkex.xml.xpath.Evaluate(path,self.document): - id = node.attributes.getNamedItem('id').value + names = [] + path = "/svg:svg/*[name()='g' or @style][@id]" + for node in self.document.xpath(path,inkex.NSS): + id = node.get('id') + inkex.debug(id) name = "%s.png" % id filename = os.path.join(tmp_dir, name) command = "inkscape -i %s -j %s -e %s %s " % (id, area, filename, svg_file) @@ -49,7 +49,7 @@ class MyEffect(inkex.Effect): names.append(id) filelist = '"%s"' % '" "'.join(pngs) - namelist = '"%s"' % '" "'.join(names) + namelist = '"%s"' % '" "'.join(names) xcf = os.path.join(tmp_dir, "%s.xcf" % docname) script_fu = """ (define |
