From 4b86dc4aee33f6d1c8ba74784e1bd46f055cad58 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Tue, 4 Aug 2020 12:13:04 +0200 Subject: [PATCH] Made some nicer call to get document unit --- extensions/fablabchemnitz_small_things_filter.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/extensions/fablabchemnitz_small_things_filter.py b/extensions/fablabchemnitz_small_things_filter.py index 52788e6e..4bcbdbf9 100644 --- a/extensions/fablabchemnitz_small_things_filter.py +++ b/extensions/fablabchemnitz_small_things_filter.py @@ -15,13 +15,8 @@ class Sieve(inkex.Effect): self.arg_parser.add_argument('--measure', default="length") def effect(self): - namedView = self.document.getroot().find(inkex.addNS('namedview', 'sodipodi')) - doc_units = namedView.get(inkex.addNS('document-units', 'inkscape')) - #inkex.utils.debug("document unit is " + doc_units) - self.options.threshold = self.svg.unittouu(str(self.options.threshold) + doc_units) + self.options.threshold = self.svg.unittouu(str(self.options.threshold) + self.svg.unit) unit_factor = 1.0 / self.svg.uutounit(1.0,self.options.unit) - #inkex.utils.debug("unit_factor is " + str(unit_factor)) - if self.options.threshold == 0: return