diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-11-08 16:58:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-08 16:58:11 +0100 |
| commit | 2e9ec2ca08133c92a40b047fed7f3a4a705e27d4 (patch) | |
| tree | 316487ea3299322f1b1a3d4a02160e74a2b2fbf4 | |
| parent | eafa256418af2d26497a623422b8777412b6f223 (diff) | |
set svg version when opening an embroidery file (#3276)
| -rw-r--r-- | lib/extensions/input.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/extensions/input.py b/lib/extensions/input.py index 7e525438..e63f1652 100644 --- a/lib/extensions/input.py +++ b/lib/extensions/input.py @@ -10,7 +10,9 @@ from inkex import errormsg from lxml import etree from ..i18n import _ +from ..metadata import InkStitchMetadata from ..stitch_plan import generate_stitch_plan +from ..update import INKSTITCH_SVG_VERSION class Input(object): @@ -22,6 +24,11 @@ class Input(object): errormsg(msg) exit(0) stitch_plan = generate_stitch_plan(embroidery_file) + + # Set SVG Version so we do request the user to update the document later on + metadata = InkStitchMetadata(stitch_plan) + metadata['inkstitch_svg_version'] = INKSTITCH_SVG_VERSION + out = etree.tostring(stitch_plan).decode('utf-8') if platform == "win32": print(out) |
