summaryrefslogtreecommitdiff
path: root/embroider_update.py
diff options
context:
space:
mode:
Diffstat (limited to 'embroider_update.py')
-rw-r--r--embroider_update.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/embroider_update.py b/embroider_update.py
index 9de39a48..b6821d54 100644
--- a/embroider_update.py
+++ b/embroider_update.py
@@ -11,22 +11,24 @@ import simplestyle
PIXELS_PER_MM = 10
+
class EmbroiderParams(inkex.Effect):
+
def __init__(self, *args, **kwargs):
inkex.Effect.__init__(self)
- self.mapping = { "zigzag_spacing": "zigzag_spacing_mm",
- "row_spacing": "row_spacing_mm",
- "pull_compensation": "pull_compensation_mm",
- "max_stitch_length": "max_stitch_length_mm",
- "satin_underlay": "contour_underlay",
- "satin_underlay_inset": "contour_underlay_inset_mm",
- "satin_zigzag_underlay_spacing": "zigzag_underlay_spacing_mm",
- "satin_center_walk": "center_walk_underlay",
- "stitch_length": "running_stitch_length_mm",
- }
-
- def effect(self):
+ self.mapping = {"zigzag_spacing": "zigzag_spacing_mm",
+ "row_spacing": "row_spacing_mm",
+ "pull_compensation": "pull_compensation_mm",
+ "max_stitch_length": "max_stitch_length_mm",
+ "satin_underlay": "contour_underlay",
+ "satin_underlay_inset": "contour_underlay_inset_mm",
+ "satin_zigzag_underlay_spacing": "zigzag_underlay_spacing_mm",
+ "satin_center_walk": "center_walk_underlay",
+ "stitch_length": "running_stitch_length_mm",
+ }
+
+ def effect(self):
for node in self.document.getroot().iter():
for old, new in self.mapping.iteritems():
old = "embroider_%s" % old
@@ -46,7 +48,7 @@ class EmbroiderParams(inkex.Effect):
if style.get('fill', 'none') != 'none' and \
'embroider_auto_fill' not in node.attrib:
- node.set('embroider_auto_fill', 'no')
+ node.set('embroider_auto_fill', 'no')
if __name__ == '__main__':
e = EmbroiderParams()