2021-06-24 20:25:13 +00:00
|
|
|
# Authors: see git history
|
|
|
|
#
|
|
|
|
# Copyright (c) 2010 Authors
|
|
|
|
# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
|
|
|
|
|
|
|
|
import inkex
|
|
|
|
|
|
|
|
from ..i18n import _
|
|
|
|
from .element import EmbroideryElement
|
|
|
|
from .validation import ObjectTypeWarning
|
|
|
|
|
|
|
|
|
2022-05-18 14:02:07 +00:00
|
|
|
class MarkerWarning(ObjectTypeWarning):
|
|
|
|
name = _("Marker Element")
|
2021-06-30 19:47:33 +00:00
|
|
|
description = _("This element will not be embroidered. "
|
2022-05-18 14:02:07 +00:00
|
|
|
"It will be applied to objects in the same group. Objects in sub-groups will be ignored.")
|
2021-06-24 20:25:13 +00:00
|
|
|
steps_to_solve = [
|
2022-05-18 14:02:07 +00:00
|
|
|
_("Turn back to normal embroidery element mode, remove the marker:"),
|
2021-06-30 19:47:33 +00:00
|
|
|
_('* Open the Fill and Stroke panel (Objects > Fill and Stroke)'),
|
|
|
|
_('* Go to the Stroke style tab'),
|
|
|
|
_('* Under "Markers" choose the first (empty) option in the first dropdown list.')
|
2021-06-24 20:25:13 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2022-05-18 14:02:07 +00:00
|
|
|
class MarkerObject(EmbroideryElement):
|
2021-06-24 20:25:13 +00:00
|
|
|
|
|
|
|
def validation_warnings(self):
|
|
|
|
repr_point = next(inkex.Path(self.parse_path()).end_points)
|
2022-05-18 14:02:07 +00:00
|
|
|
yield MarkerWarning(repr_point)
|
2021-06-24 20:25:13 +00:00
|
|
|
|
2024-03-26 06:10:40 +00:00
|
|
|
def to_stitch_groups(self, last_stitch_group):
|
2021-06-24 20:25:13 +00:00
|
|
|
return []
|