diff options
Diffstat (limited to 'share/extensions/flatten.py')
| -rwxr-xr-x | share/extensions/flatten.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/share/extensions/flatten.py b/share/extensions/flatten.py index 8dc4e393b..2e1a491cd 100755 --- a/share/extensions/flatten.py +++ b/share/extensions/flatten.py @@ -27,9 +27,9 @@ class MyEffect(inkex.Effect): help="Minimum flatness of the subdivided curves") def effect(self): for id, node in self.selected.iteritems(): - if node.tagName == 'path': - d = node.attributes.getNamedItem('d') - p = cubicsuperpath.parsePath(d.value) + if node.tag == inkex.addNS('path','svg'): + d = node.get('d') + p = cubicsuperpath.parsePath(d) cspsubdiv.cspsubdiv(p, self.options.flat) np = [] for sp in p: @@ -40,7 +40,7 @@ class MyEffect(inkex.Effect): cmd = 'M' first = False np.append([cmd,[csp[1][0],csp[1][1]]]) - d.value = simplepath.formatPath(np) + node.set('d',simplepath.formatPath(np)) e = MyEffect() e.affect()
\ No newline at end of file |
