From 8a9df3ab5ec4bcbf00af6b58239274946e8d1abd Mon Sep 17 00:00:00 2001 From: leyghisbb Date: Sun, 30 Aug 2020 11:51:54 +0200 Subject: [PATCH] Removed deprecations from dots2pathpoints --- extensions/fablabchemnitz_dots2pathpoints.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/extensions/fablabchemnitz_dots2pathpoints.py b/extensions/fablabchemnitz_dots2pathpoints.py index aa0a06dd..35c7a450 100644 --- a/extensions/fablabchemnitz_dots2pathpoints.py +++ b/extensions/fablabchemnitz_dots2pathpoints.py @@ -33,17 +33,16 @@ class Pathpoints2Dots(inkex.Effect): def effect(self): if len(self.svg.selected) != 2: - errormsg("Please select exact two objects:\n1. object representing path,\n2. object representing dots.") + inkex.errormsg("Please select exact two objects:\n1. object representing path,\n2. object representing dots.") return - dot = self.svg.selected[0] - iddot = dot.get('id') - path = self.svg.selected[1] - idpath = path.get('id') - + nodes = list(self.svg.selected.items()) + iddot = nodes[0][0] + idpath = nodes[1][0] + dot = self.svg.selected[iddot] + path = self.svg.selected[idpath] self.svg.selected.popitem() self.svg.selected.popitem() - bb = dot.bounding_box() parent = path.find('..') group = inkex.Group() @@ -72,4 +71,4 @@ class Pathpoints2Dots(inkex.Effect): clone.set('y',point.y-bb.center.y) group.add(clone) -Pathpoints2Dots().run() \ No newline at end of file +Pathpoints2Dots().run()