summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/build-distribution-archives2
-rwxr-xr-xbin/build-python10
-rw-r--r--lib/elements/element.py19
-rw-r--r--lib/inx/utils.py17
-rw-r--r--lib/stitches/auto_fill.py62
-rw-r--r--stub.py69
-rw-r--r--templates/auto_satin.inx4
-rw-r--r--templates/convert_to_satin.inx4
-rw-r--r--templates/cut_satin.inx4
-rw-r--r--templates/embroider.inx4
-rw-r--r--templates/flip.inx4
-rw-r--r--templates/global_commands.inx4
-rw-r--r--templates/input.inx4
-rw-r--r--templates/install.inx4
-rw-r--r--templates/layer_commands.inx4
-rw-r--r--templates/lettering.inx4
-rw-r--r--templates/object_commands.inx4
-rw-r--r--templates/output.inx4
-rw-r--r--templates/params.inx4
-rw-r--r--templates/print.inx4
-rw-r--r--templates/remove_embroidery_settings.inx4
-rw-r--r--templates/simulate.inx4
-rw-r--r--templates/troubleshoot.inx4
-rw-r--r--templates/zip.inx4
24 files changed, 110 insertions, 141 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives
index 825db510..ff2f3e79 100755
--- a/bin/build-distribution-archives
+++ b/bin/build-distribution-archives
@@ -1,6 +1,6 @@
#!/bin/bash
-VERSION="$(echo ${GITHUB_REF} | tr / -)"
+VERSION="$(echo ${GITHUB_REF#refs/heads/} | tr / -)"
OS="${BUILD:-$(uname)}"
ARCH="$(uname -m)"
diff --git a/bin/build-python b/bin/build-python
index 69058593..0dd3e0a0 100755
--- a/bin/build-python
+++ b/bin/build-python
@@ -5,9 +5,11 @@ set -e
site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")"
if [ "$BUILD" = "linux" ]; then
- # pyinstaller misses these two
+ # pyinstaller misses these
pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so:. "
pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/libproxy.so.1:. "
+ pyinstaller_args+="--add-binary /lib/x86_64-linux-gnu/libnsl.so.1:. "
+ pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/libxcb.so.1:. "
fi
# This one's tricky. ink/stitch doesn't actually _use_ gi.repository.Gtk,
@@ -24,7 +26,7 @@ pyinstaller_args+="--hidden-import wx "
# We need to use the precompiled bootloader linked with graphical Mac OS X
# libraries if we develop a GUI application for Mac:
-if [ "$BUILD" = "osx" ]; then
+if [ "$BUILD" = "osx" -o "$BUILD" = "windows" ]; then
pyinstaller_args+="--windowed "
fi
@@ -55,7 +57,3 @@ mv dist/bin dist/inkstitch
if [ "$BUILD" = "osx" ]; then
rm -rf dist/inkstitch.app/
fi
-
-# Inkscape doesn't let us run native binaries as extensions(?!). Instead we
-# add this stub script which executes the binary that pyinstaller creates.
-cp stub.py dist/inkstitch.py
diff --git a/lib/elements/element.py b/lib/elements/element.py
index dd6c9063..04f15b6e 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -1,9 +1,9 @@
-from copy import deepcopy
import sys
+from copy import deepcopy
-from cspsubdiv import cspsubdiv
import cubicsuperpath
import simplestyle
+from cspsubdiv import cspsubdiv
from ..commands import find_commands
from ..i18n import _
@@ -169,6 +169,17 @@ class EmbroideryElement(object):
return width * self.stroke_scale
@property
+ @param('ties',
+ _('Ties'),
+ tooltip=_('Add ties. Manual stitch will not add ties.'),
+ type='boolean',
+ default=True,
+ sort_index=4)
+ @cache
+ def ties(self):
+ return self.get_boolean_param("ties", True)
+
+ @property
def path(self):
# A CSP is a "cubic superpath".
#
@@ -269,6 +280,10 @@ class EmbroideryElement(object):
patches = self.to_patches(last_patch)
+ if not self.ties:
+ for patch in patches:
+ patch.stitch_as_is = True
+
if patches:
patches[-1].trim_after = self.has_command("trim") or self.trim_after
patches[-1].stop_after = self.has_command("stop") or self.stop_after
diff --git a/lib/inx/utils.py b/lib/inx/utils.py
index 1dc96829..a7c98a60 100644
--- a/lib/inx/utils.py
+++ b/lib/inx/utils.py
@@ -1,11 +1,12 @@
import errno
-import os
import gettext
+import os
+import sys
from os.path import dirname
-from jinja2 import Environment, FileSystemLoader
-from ..i18n import translation as default_translation, locale_dir, N_
+from jinja2 import Environment, FileSystemLoader
+from ..i18n import N_, locale_dir, translation as default_translation
_top_path = dirname(dirname(dirname(os.path.realpath(__file__))))
inx_path = os.path.join(_top_path, "inx")
@@ -25,6 +26,16 @@ def build_environment():
env.install_gettext_translations(current_translation)
env.globals["locale"] = current_locale
+ if "BUILD" in os.environ:
+ # building a ZIP release, with inkstitch packaged as a binary
+ if sys.platform == "win32":
+ env.globals["command_tag"] = '<command reldir="extensions">inkstitch/bin/inkstitch.exe</command>'
+ else:
+ env.globals["command_tag"] = '<command reldir="extensions">inkstitch/bin/inkstitch</command>'
+ else:
+ # user is running inkstitch.py directly as a developer
+ env.globals["command_tag"] = '<command reldir="extensions" interpreter="python">inkstitch.py</command>'
+
return env
diff --git a/lib/stitches/auto_fill.py b/lib/stitches/auto_fill.py
index 5833b779..dbbef136 100644
--- a/lib/stitches/auto_fill.py
+++ b/lib/stitches/auto_fill.py
@@ -1,18 +1,18 @@
# -*- coding: UTF-8 -*-
-from itertools import groupby, chain
import math
+from itertools import chain, groupby
import networkx
from shapely import geometry as shgeo
from shapely.ops import snap
from shapely.strtree import STRtree
+from .fill import intersect_region_with_grating, stitch_row
+from .running_stitch import running_stitch
from ..debug import debug
from ..svg import PIXELS_PER_MM
from ..utils.geometry import Point as InkstitchPoint, line_string_to_point_list
-from .fill import intersect_region_with_grating, stitch_row
-from .running_stitch import running_stitch
class PathEdge(object):
@@ -52,8 +52,7 @@ def auto_fill(shape,
starting_point,
ending_point=None,
underpath=True):
-
- fill_stitch_graph = build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing)
+ fill_stitch_graph = build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing, starting_point, ending_point)
if not graph_is_valid(fill_stitch_graph, shape, max_stitch_length):
return fallback(shape, running_stitch_length)
@@ -95,7 +94,7 @@ def project(shape, coords, outline_index):
@debug.time
-def build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing):
+def build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing, starting_point=None, ending_point=None):
"""build a graph representation of the grating segments
This function builds a specialized graph (as in graph theory) that will
@@ -146,11 +145,39 @@ def build_fill_stitch_graph(shape, angle, row_spacing, end_row_spacing):
tag_nodes_with_outline_and_projection(graph, shape, graph.nodes())
add_edges_between_outline_nodes(graph, duplicate_every_other=True)
+ if starting_point:
+ insert_node(graph, shape, starting_point)
+
+ if ending_point:
+ insert_node(graph, shape, ending_point)
+
debug.log_graph(graph, "graph")
return graph
+def insert_node(graph, shape, point):
+ """Add node to graph, splitting one of the outline edges"""
+
+ point = tuple(point)
+ outline = which_outline(shape, point)
+ projection = project(shape, point, outline)
+ projected_point = list(shape.boundary)[outline].interpolate(projection)
+ node = (projected_point.x, projected_point.y)
+
+ edges = []
+ for start, end, key, data in graph.edges(keys=True, data=True):
+ if key == "outline":
+ edges.append(((start, end), data))
+
+ edge, data = min(edges, key=lambda (edge, data): shgeo.LineString(edge).distance(projected_point))
+
+ graph.remove_edge(*edge, key="outline")
+ graph.add_edge(edge[0], node, key="outline", **data)
+ graph.add_edge(node, edge[1], key="outline", **data)
+ tag_nodes_with_outline_and_projection(graph, shape, nodes=[node])
+
+
def tag_nodes_with_outline_and_projection(graph, shape, nodes):
for node in nodes:
outline_index = which_outline(shape, node)
@@ -159,6 +186,27 @@ def tag_nodes_with_outline_and_projection(graph, shape, nodes):
graph.add_node(node, outline=outline_index, projection=outline_projection)
+def add_boundary_travel_nodes(graph, shape):
+ for outline_index, outline in enumerate(shape.boundary):
+ prev = None
+ for point in outline.coords:
+ point = shgeo.Point(point)
+ if prev is not None:
+ # Subdivide long straight line segments. Otherwise we may not
+ # have a node near the user's chosen starting or ending point
+ length = point.distance(prev)
+ segment = shgeo.LineString((prev, point))
+ if length > 1:
+ # Just plot a point every pixel, that should be plenty of
+ # resolution. A pixel is around a quarter of a millimeter.
+ for i in xrange(1, int(length)):
+ subpoint = segment.interpolate(i)
+ graph.add_node((subpoint.x, subpoint.y), projection=outline.project(subpoint), outline=outline_index)
+
+ graph.add_node((point.x, point.y), projection=outline.project(point), outline=outline_index)
+ prev = point
+
+
def add_edges_between_outline_nodes(graph, duplicate_every_other=False):
"""Add edges around the outlines of the graph, connecting sequential nodes.
@@ -240,6 +288,8 @@ def build_travel_graph(fill_stitch_graph, shape, fill_stitch_angle, underpath):
# This will ensure that a path traveling inside the shape can reach its
# target on the outline, which will be one of the points added above.
tag_nodes_with_outline_and_projection(graph, shape, boundary_points)
+ else:
+ add_boundary_travel_nodes(graph, shape)
add_edges_between_outline_nodes(graph)
diff --git a/stub.py b/stub.py
deleted file mode 100644
index c4627891..00000000
--- a/stub.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import subprocess
-import sys
-import traceback
-
-# ink/stitch
-#
-# stub.py: pyinstaller execution stub
-#
-# pyinstaller packages the inkstitch extensions into nice tidy executables.
-# That's great, but Inkscape can't execute a plain binary as an extension(!).
-#
-# This Python script exists only to execute the actual extension binary. It
-# can be copied to, e.g., "embroider_params.py", in which case it will look
-# for a binary at inkstitch/bin/embroider_params.
-script_name = os.path.basename(__file__)
-
-if script_name.endswith('.py'):
- binary_name = script_name[:-3]
-else:
- # Probably not right, but we can at least try.
- binary_name = script_name
-
-binary_path = os.path.join("inkstitch", "bin", binary_name)
-
-args = sys.argv[:]
-args[0] = binary_path
-
-# os.execve works here for Linux, but only this seems to get the
-# extension output to Inkscape on Windows
-try:
- extension = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- stdout, stderr = extension.communicate()
-except BaseException:
- print >> sys.stderr, "Unexpected error launching Ink/Stitch."
- print >> sys.stderr, "If you're having trouble, please file an issue here, including the text below:"
- print >> sys.stderr, " https://github.com/inkstitch/inkstitch/issues\n"
- print >> sys.stderr, "Tried to launch:", binary_path
- print >> sys.stderr, "Arguments:", args
- print >> sys.stderr, "Debugging information:\n"
- print >> sys.stderr, traceback.format_exc()
- sys.exit(1)
-
-if sys.platform == "win32":
- import msvcrt
-
- msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
-
-try:
- # In Python 3, we need to use sys.stdout.buffer to write binary data to stdout.
- sys.stdout.buffer.write(stdout)
- sys.stdout.buffer.flush()
-except AttributeError:
- # Python 2 doesn't have sys.stdout.buffer but we can write binary data to stdout by default.
- sys.stdout.write(stdout)
- sys.stdout.flush()
-
-stderr = stderr.strip()
-if stderr:
- try:
- sys.stderr.buffer.write(stderr)
- sys.stderr.buffer.flush()
- except AttributeError:
- sys.stderr.write(stderr)
- sys.stderr.flush()
-
-sys.exit(extension.returncode)
diff --git a/templates/auto_satin.inx b/templates/auto_satin.inx
index 60ca29cd..673ac51e 100644
--- a/templates/auto_satin.inx
+++ b/templates/auto_satin.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Auto-Route Satin Columns{% endtrans %}</name>
<id>org.inkstitch.auto_satin.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="trim" type="boolean" _gui-text="{% trans %}Trim jump stitches{% endtrans %}">true</param>
<param name="preserve_order" type="boolean" _gui-text="{% trans %}Preserve order of satin columns{% endtrans %}">false</param>
<param name="extension" type="string" gui-hidden="true">auto_satin</param>
@@ -16,6 +14,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/convert_to_satin.inx b/templates/convert_to_satin.inx
index d0f87911..80f0b678 100644
--- a/templates/convert_to_satin.inx
+++ b/templates/convert_to_satin.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Convert Line to Satin{% endtrans %}</name>
<id>org.inkstitch.convert_to_satin.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">convert_to_satin</param>
<effect>
<object-type>all</object-type>
@@ -14,6 +12,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/cut_satin.inx b/templates/cut_satin.inx
index c96d9092..b780543a 100644
--- a/templates/cut_satin.inx
+++ b/templates/cut_satin.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Cut Satin Column{% endtrans %}</name>
<id>org.inkstitch.cut_satin.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">cut_satin</param>
<effect>
<object-type>all</object-type>
@@ -14,6 +12,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/embroider.inx b/templates/embroider.inx
index f030c8d6..ea062aa4 100644
--- a/templates/embroider.inx
+++ b/templates/embroider.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Embroider{% endtrans %}</name>
<id>org.inkstitch.embroider.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="collapse_len_mm" type="float" min="0.0" max="10.0" _gui-text="{% trans %}Collapse length (mm){% endtrans %}" _gui-description="{% trans %}Jump stitches smaller than this will be treated as normal stitches.{% endtrans %}">3.0</param>
<param name="hide_layers" type="boolean" _gui-text="{% trans %}Hide other layers{% endtrans %}" _gui-description="{% trans %}Hide all other top-level layers when the embroidery layer is generated, in order to make stitching discernible.{% endtrans %}">true</param>
<param name="output_format" type="optiongroup" _gui-text="{% trans %}Output file format{% endtrans %}" appearance="minimal">
@@ -23,6 +21,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/flip.inx b/templates/flip.inx
index 763cf7cc..29b11457 100644
--- a/templates/flip.inx
+++ b/templates/flip.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Flip Satin Column Rails{% endtrans %}</name>
<id>org.inkstitch.flip_satins.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">flip</param>
<effect>
<object-type>all</object-type>
@@ -14,6 +12,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/global_commands.inx b/templates/global_commands.inx
index 24d42c90..d37e2e41 100644
--- a/templates/global_commands.inx
+++ b/templates/global_commands.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Add Commands{% endtrans %}</name>
<id>org.inkstitch.global_commands.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="description" type="description">{% trans %}These commands affect the entire embroidery design.{% endtrans %}</param>
{% for command, description in global_commands %}
<param name="{{ command }}" type="boolean" _gui-text="{{ _(description) }}">false</param>
@@ -19,6 +17,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/input.inx b/templates/input.inx
index 6e810a70..5f4a4610 100644
--- a/templates/input.inx
+++ b/templates/input.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{{ format | upper }} file input</name>
<id>org.inkstitch.input.{{ format }}.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<input>
<extension>.{{ format }}</extension>
<mimetype>application/x-embroidery-{{ format }}</mimetype>
@@ -12,6 +10,6 @@
</input>
<param name="extension" type="string" gui-hidden="true">input</param>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/install.inx b/templates/install.inx
index adfffd9d..0ab22b0b 100644
--- a/templates/install.inx
+++ b/templates/install.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Install add-ons for Inkscape{% endtrans %}</name>
<id>org.inkstitch.install.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">install</param>
<effect>
<object-type>all</object-type>
@@ -12,6 +10,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/layer_commands.inx b/templates/layer_commands.inx
index 6b978e43..249d536e 100644
--- a/templates/layer_commands.inx
+++ b/templates/layer_commands.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Add Layer Commands{% endtrans %}</name>
<id>org.inkstitch.layer_commands.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="description" type="description">{% trans %}Commands will be added to the currently-selected layer.{% endtrans %}</param>
{% for command, description in layer_commands %}
<param name="{{ command }}" type="boolean" _gui-text="{{ _(description) }}">false</param>
@@ -18,6 +16,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/lettering.inx b/templates/lettering.inx
index 96e90ca0..65eee8a1 100644
--- a/templates/lettering.inx
+++ b/templates/lettering.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Lettering{% endtrans %}</name>
<id>org.inkstitch.lettering.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">lettering</param>
<effect>
<object-type>all</object-type>
@@ -12,6 +10,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/object_commands.inx b/templates/object_commands.inx
index 1b1c40d9..affe7584 100644
--- a/templates/object_commands.inx
+++ b/templates/object_commands.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Attach Commands to Selected Objects{% endtrans %}</name>
<id>org.inkstitch.commands.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
{% for command, description in object_commands %}
<param name="{{ command }}" type="boolean" _gui-text="{{ _(description ) }}">false</param>
{% endfor %}
@@ -17,6 +15,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/output.inx b/templates/output.inx
index 6899c5d3..ffff4be9 100644
--- a/templates/output.inx
+++ b/templates/output.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{{ format | upper }} file output</name>
<id>org.inkstitch.output.{{ format }}.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<output>
<extension>.{{ format }}</extension>
<mimetype>application/x-embroidery-{{ format }}</mimetype>
@@ -16,6 +14,6 @@
{% set params = "output_params_" + format + ".xml" %}
{% include params ignore missing %}
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/params.inx b/templates/params.inx
index 9f60f4ae..a2dc89a3 100644
--- a/templates/params.inx
+++ b/templates/params.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Params{% endtrans %}</name>
<id>org.inkstitch.params.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">params</param>
<effect>
<object-type>all</object-type>
@@ -12,6 +10,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/print.inx b/templates/print.inx
index 61385129..2aec826b 100644
--- a/templates/print.inx
+++ b/templates/print.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Print / Realistic Preview{% endtrans %}</name>
<id>org.inkstitch.print.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">print</param>
<effect>
<object-type>all</object-type>
@@ -12,6 +10,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/remove_embroidery_settings.inx b/templates/remove_embroidery_settings.inx
index d070f34f..44b34ded 100644
--- a/templates/remove_embroidery_settings.inx
+++ b/templates/remove_embroidery_settings.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Remove embroidery settings{% endtrans %}</name>
<id>org.inkstitch.remove_embroidery_settings.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="description" type="description">{% trans %}Use this extension to remove the information Ink/Stitch has stored in your document. This can be especially useful if you copy and paste objects from an embroidery design into another document.{% endtrans %}</param>
<param name="del_params" type="boolean" _gui-text="{% trans %}Remove Params{% endtrans %}"
_gui-description="{% trans %}Removes params from selected objects or all objects if nothing is selected.{% endtrans %}">true</param>
@@ -19,6 +17,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/simulate.inx b/templates/simulate.inx
index 90f3717c..09f29d38 100644
--- a/templates/simulate.inx
+++ b/templates/simulate.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Simulate{% endtrans %}</name>
<id>org.inkstitch.simulate.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">simulate</param>
<effect>
<object-type>all</object-type>
@@ -12,6 +10,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/troubleshoot.inx b/templates/troubleshoot.inx
index 6931fb39..64f4ebb0 100644
--- a/templates/troubleshoot.inx
+++ b/templates/troubleshoot.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>{% trans %}Troubleshoot Objects{% endtrans %}</name>
<id>org.inkstitch.troubleshoot.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<param name="extension" type="string" gui-hidden="true">troubleshoot</param>
<effect>
<object-type>all</object-type>
@@ -13,6 +11,6 @@
</effects-menu>
</effect>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>
diff --git a/templates/zip.inx b/templates/zip.inx
index 952123c9..485e3f1b 100644
--- a/templates/zip.inx
+++ b/templates/zip.inx
@@ -2,8 +2,6 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>embroidery ZIP file output</name>
<id>org.inkstitch.output.zip.{{ locale }}</id>
- <dependency type="executable" location="extensions">inkstitch.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
<output>
<extension>.zip</extension>
<mimetype>application/zip</mimetype>
@@ -16,6 +14,6 @@
{% endfor %}
<param name="extension" type="string" gui-hidden="true">zip</param>
<script>
- <command reldir="extensions" interpreter="python">inkstitch.py</command>
+ {{ command_tag | safe }}
</script>
</inkscape-extension>