summaryrefslogtreecommitdiff
path: root/lib/extensions/input.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2022-06-24 17:11:52 +0200
committerGitHub <noreply@github.com>2022-06-24 17:11:52 +0200
commitab8c87928b39e7874c09a75b2f9badd3a46719b2 (patch)
tree11a934b028f8a5dab34e4710d43ab895e0510fbb /lib/extensions/input.py
parent3985b5ac719cb699b1539bce0bc7376970702b4d (diff)
Update pyembroidery (#1683)
Embroidery formats (read) .hus: Husqvarna Embroidery Format .zhs: Zeng Hsing Embroidery Format Color formats (read & write) .col : Color format. .edr : Color format. .inf : Color format. Stitch formats (read & write) .pmv : Brother Stitch Format. Image (write) .png : Portable Network Graphic (line art) G-Code The export file format is not .txt anymore but .gcode Bug fixes
Diffstat (limited to 'lib/extensions/input.py')
-rw-r--r--lib/extensions/input.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/extensions/input.py b/lib/extensions/input.py
index 066b9003..4240be0e 100644
--- a/lib/extensions/input.py
+++ b/lib/extensions/input.py
@@ -5,11 +5,19 @@
from lxml import etree
+from inkex import errormsg
+
+from ..i18n import _
from ..stitch_plan import generate_stitch_plan
class Input(object):
def run(self, args):
embroidery_file = args[0]
+ if args[0].endswith(('edr', 'col', 'inf')):
+ msg = _("Ink/Stitch cannot import color formats directly. But you can open the embroidery file and apply the color with "
+ "Extensions > Ink/Stitch > Thread Color Management > Apply Threadlist")
+ errormsg(msg)
+ exit(0)
stitch_plan = generate_stitch_plan(embroidery_file)
print(etree.tostring(stitch_plan).decode('utf-8'))