summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/letters_to_font.py6
-rw-r--r--lib/extensions/stitch_plan_preview.py3
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/extensions/letters_to_font.py b/lib/extensions/letters_to_font.py
index 158d0d9f..56a33ad8 100644
--- a/lib/extensions/letters_to_font.py
+++ b/lib/extensions/letters_to_font.py
@@ -25,7 +25,7 @@ class LettersToFont(InkstitchExtension):
InkstitchExtension.__init__(self, *args, **kwargs)
self.arg_parser.add_argument("-d", "--font-dir", type=str, default="", dest="font_dir")
self.arg_parser.add_argument("-f", "--file-format", type=str, default="", dest="file_format")
- self.arg_parser.add_argument("-c", "--import-commands", type=inkex.Boolean, default=False, dest="import_commands")
+ self.arg_parser.add_argument("-c", "--import-commands", type=str, default="params", dest="import_commands")
def effect(self):
font_dir = self.options.font_dir
@@ -50,7 +50,7 @@ class LettersToFont(InkstitchExtension):
# remove color block groups if we import without commands
# there will only be one object per color block anyway
- if not self.options.import_commands:
+ if self.options.import_commands == "none":
for element in letter.iter(SVG_PATH_TAG):
group.insert(0, element)
else:
@@ -78,4 +78,4 @@ class LettersToFont(InkstitchExtension):
return stitch_plan
def insert_baseline(self, document):
- document.namedview.new_guide(position=0.0, name="baseline")
+ document.namedview.add_guide(position=0.0, name="baseline")
diff --git a/lib/extensions/stitch_plan_preview.py b/lib/extensions/stitch_plan_preview.py
index e5d22fa7..fbfe3628 100644
--- a/lib/extensions/stitch_plan_preview.py
+++ b/lib/extensions/stitch_plan_preview.py
@@ -22,6 +22,7 @@ class StitchPlanPreview(InkstitchExtension):
self.arg_parser.add_argument("-v", "--layer-visibility", type=int, default=0, dest="layer_visibility")
self.arg_parser.add_argument("-n", "--needle-points", type=Boolean, default=False, dest="needle_points")
self.arg_parser.add_argument("-i", "--insensitive", type=Boolean, default=False, dest="insensitive")
+ self.arg_parser.add_argument("-c", "--visual-commands", type=Boolean, default="symbols", dest="visual_commands")
def effect(self):
# delete old stitch plan
@@ -33,7 +34,7 @@ class StitchPlanPreview(InkstitchExtension):
return
realistic = False
- visual_commands = True
+ visual_commands = self.options.visual_commands
self.metadata = self.get_inkstitch_metadata()
collapse_len = self.metadata['collapse_len_mm']
min_stitch_len = self.metadata['min_stitch_len_mm']