diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-01-26 07:37:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-26 07:37:21 +0100 |
| commit | 160ef32d43f5fc0d7229dbec6e7daf638a811d15 (patch) | |
| tree | 694256bd5b8534c4756c5c32fac49a769b1658c1 /lib/extensions/selection_to_anchor_line.py | |
| parent | c08e17b1f8290959b01fada161f0ee339454f8ea (diff) | |
Improve satin guided ripple stitch and add stitch grid first option (#3436)
* ripple stitch: add stitch grid first option
* introduce an anchor line to fine tune satin guided ripples
Diffstat (limited to 'lib/extensions/selection_to_anchor_line.py')
| -rw-r--r-- | lib/extensions/selection_to_anchor_line.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/extensions/selection_to_anchor_line.py b/lib/extensions/selection_to_anchor_line.py new file mode 100644 index 00000000..fe9442f1 --- /dev/null +++ b/lib/extensions/selection_to_anchor_line.py @@ -0,0 +1,26 @@ +# Authors: see git history +# +# Copyright (c) 2021 Authors +# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. + +import inkex + +from ..i18n import _ +from ..marker import set_marker +from ..svg.tags import EMBROIDERABLE_TAGS +from .base import InkstitchExtension + + +class SelectionToAnchorLine(InkstitchExtension): + + def effect(self): + if not self.get_elements(): + return + + if not self.svg.selected: + inkex.errormsg(_("Please select at least one object to be marked as a anchor line.")) + return + + for pattern in self.get_nodes(): + if pattern.tag in EMBROIDERABLE_TAGS: + set_marker(pattern, 'start', 'anchor-line') |
