From 31fbdf521b0e584ca3395e3827a6f2a02db688c1 Mon Sep 17 00:00:00 2001 From: Rick Levine Date: Thu, 2 Feb 2023 21:27:16 -0800 Subject: Add filename to .dst header --- lib/output.py | 5 +++++ pyembroidery | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/output.py b/lib/output.py index a65a3af1..a6edfe86 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['filename'] = os.path.splitext(os.path.basename(file_path))[0] + stitch = Stitch(0, 0) for color_block in stitch_plan: diff --git a/pyembroidery b/pyembroidery index 9347ea88..322bfa5f 160000 --- a/pyembroidery +++ b/pyembroidery @@ -1 +1 @@ -Subproject commit 9347ea882a40764cfc712d1bb9f90324945767c0 +Subproject commit 322bfa5f7edbbcf741ff032b82a637d04b0b97a0 -- cgit v1.2.3