summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Levine <rick@xoab.us>2023-02-16 11:32:28 -0800
committerGitHub <noreply@github.com>2023-02-16 11:32:28 -0800
commit643903a40f8009ad3eafcab362f7d112cabd3ffb (patch)
treeda8c565a3cda0d4efaa52e40f3e063205d84e78b
parent4c25ae7444611be2cd2780a16c2f42c3b1fc53e6 (diff)
parentca819c51fc20a694bbbf6a47876dc0546c508509 (diff)
Merge pull request #2049 from inkstitch/rlevine/dst_header_title
Add filename to .dst header
-rw-r--r--lib/output.py5
m---------pyembroidery0
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/output.py b/lib/output.py
index a65a3af1..fb4580b7 100644
--- a/lib/output.py
+++ b/lib/output.py
@@ -3,6 +3,7 @@
# Copyright (c) 2010 Authors
# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
+import os
import sys
import inkex
@@ -60,6 +61,10 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}):
# origin = origin * scale
pattern = pyembroidery.EmbPattern()
+
+ # For later use when writing .dst header title field.
+ pattern.extras['name'] = os.path.splitext(svg.name)[0]
+
stitch = Stitch(0, 0)
for color_block in stitch_plan:
diff --git a/pyembroidery b/pyembroidery
-Subproject 9347ea882a40764cfc712d1bb9f90324945767c
+Subproject 322bfa5f7edbbcf741ff032b82a637d04b0b97a