set svg version when opening an embroidery file (#3276)

pull/3277/head dev-build-claudine-make_more_fonts_sortable
Kaalleen 2024-11-08 16:58:11 +01:00 zatwierdzone przez GitHub
rodzic eafa256418
commit 2e9ec2ca08
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -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)