From ab8c87928b39e7874c09a75b2f9badd3a46719b2 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Fri, 24 Jun 2022 17:11:52 +0200 Subject: 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 --- lib/extensions/input.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/extensions/input.py') 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')) -- cgit v1.2.3