diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2025-02-03 22:37:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-03 22:37:36 +0100 |
| commit | 497fbcfab5734aac889f15b72384a6a8631fffa4 (patch) | |
| tree | 1f1a690a6108d7e4e0fac599d4e554edae9db6f9 /lib/elements/utils.py | |
| parent | e1c6d8c5956c7c3c5e158c1f7415edd5bc1a0cc1 (diff) | |
Add debug variable to enable sew stack elements (#3476)
Diffstat (limited to 'lib/elements/utils.py')
| -rw-r--r-- | lib/elements/utils.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/elements/utils.py b/lib/elements/utils.py index a3de62e9..dfe1eb3a 100644 --- a/lib/elements/utils.py +++ b/lib/elements/utils.py @@ -3,15 +3,19 @@ # Copyright (c) 2010 Authors # Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details. -from lxml.etree import Comment from typing import List, Optional + from inkex import BaseElement +from lxml.etree import Comment from ..commands import is_command, layer_commands +from ..debug.utils import safe_get from ..marker import has_marker from ..svg.tags import (CONNECTOR_TYPE, EMBROIDERABLE_TAGS, INKSCAPE_GROUPMODE, NOT_EMBROIDERABLE_TAGS, SVG_CLIPPATH_TAG, SVG_DEFS_TAG, - SVG_GROUP_TAG, SVG_MASK_TAG, SVG_IMAGE_TAG, SVG_TEXT_TAG) + SVG_GROUP_TAG, SVG_IMAGE_TAG, SVG_MASK_TAG, + SVG_TEXT_TAG) +from ..utils.paths import get_ini from .clone import Clone, is_clone from .element import EmbroideryElement from .empty_d_object import EmptyDObject @@ -54,7 +58,8 @@ def node_to_elements(node, clone_to_element=False) -> List[EmbroideryElement]: if element.get_boolean_param("stroke_first", False): elements.reverse() - elements.append(sew_stack) + if safe_get(get_ini(), "DEBUG", "sew_stack_enable", default=False): + elements.append(sew_stack) return elements |
