index dcec88e2c76510091b178c5253e9a270c1f0cf81..071768e272caccf7c7a4d58e999af25b2008f4fa 100755 (executable)
help="straightening behavior for cubic segments")
def effect(self):
for id, node in self.selected.iteritems():
- if node.tagName == 'path':
- d = node.attributes.getNamedItem('d')
- p = simplepath.parsePath(d.value)
+ if node.tag == inkex.addNS('path', 'svg'):
+ d = node.get('d')
+ p = simplepath.parsePath(d)
last = []
subPathStart = []
for cmd,params in p:
last = subPathStart[:]
else:
last = params[-2:]
- d.value = simplepath.formatPath(p)
+ node.set('d',simplepath.formatPath(p))
e = SegmentStraightener()
e.affect()