summaryrefslogtreecommitdiff
path: root/lib/extensions/base.py
diff options
context:
space:
mode:
authorKaalleen <reni@allenka.de>2021-06-27 22:29:57 +0200
committerKaalleen <reni@allenka.de>2021-06-27 22:29:57 +0200
commitc602c4c517cab40dfc2dc7dbc5c29c037cccafae (patch)
tree86a45909c36e307e13a0b9e009d7d2d6414b11a0 /lib/extensions/base.py
parentd6df8084f4a0fe8c8e174ea230d158512bd8f094 (diff)
group patterns
Diffstat (limited to 'lib/extensions/base.py')
-rw-r--r--lib/extensions/base.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/extensions/base.py b/lib/extensions/base.py
index 00d4a00d..ce5f8b1d 100644
--- a/lib/extensions/base.py
+++ b/lib/extensions/base.py
@@ -12,7 +12,7 @@ import inkex
from lxml import etree
from stringcase import snakecase
-from ..commands import is_command, layer_commands
+from ..commands import is_command, layer_commands, group_commands
from ..elements import EmbroideryElement, nodes_to_elements
from ..elements.clone import is_clone
from ..i18n import _
@@ -171,9 +171,12 @@ class InkstitchExtension(inkex.Effect):
if selected:
if node.tag == SVG_GROUP_TAG:
pass
- elif (node.tag in EMBROIDERABLE_TAGS or is_clone(node)) and not node.get(INKSTITCH_ATTRIBS['pattern']):
+ elif ((node.tag in EMBROIDERABLE_TAGS or is_clone(node)) and not
+ (len(list(group_commands(node, 'pattern_group'))) and not node.get(INKSTITCH_ATTRIBS['satin_column']))):
nodes.append(node)
- elif troubleshoot and (node.tag in NOT_EMBROIDERABLE_TAGS or node.get(INKSTITCH_ATTRIBS['pattern'])):
+ # add images, text and patterns for the troubleshoot extension
+ elif (troubleshoot and (node.tag in NOT_EMBROIDERABLE_TAGS or
+ (len(list(group_commands(node, 'pattern_group'))) and not node.get(INKSTITCH_ATTRIBS['satin_column'])))):
nodes.append(node)
return nodes