diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-07-24 22:15:28 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-07-25 21:41:10 -0400 |
| commit | 1505cea3d445c9827dd0436e84d8e61593f423eb (patch) | |
| tree | 34880880152f47ee9698524c3021b2be06764e5e | |
| parent | eef5754e3394b237f84501e3dfed767ef9794b6b (diff) | |
add support for ignore command
| -rw-r--r-- | inx/inkstitch_commands.inx | 1 | ||||
| -rw-r--r-- | lib/extensions/base.py | 3 | ||||
| -rw-r--r-- | lib/extensions/commands.py | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/inx/inkstitch_commands.inx b/inx/inkstitch_commands.inx index 7b42ca0e..33bd990a 100644 --- a/inx/inkstitch_commands.inx +++ b/inx/inkstitch_commands.inx @@ -8,6 +8,7 @@ <param name="fill_end" type="boolean" _gui-text="Fill ending position">false</param> <param name="stop" type="boolean" _gui-text="Stop after sewing this object">false</param> <param name="trim" type="boolean" _gui-text="Trim thread after sewing this object">false</param> + <param name="ignore" type="boolean" _gui-text="Ignore this object (do not stitch)">false</param> <param name="extension" type="string" gui-hidden="true">commands</param> <effect> <object-type>all</object-type> diff --git a/lib/extensions/base.py b/lib/extensions/base.py index d230f1b0..5e5adccd 100644 --- a/lib/extensions/base.py +++ b/lib/extensions/base.py @@ -114,6 +114,9 @@ class InkstitchExtension(inkex.Effect): nodes = [] element = EmbroideryElement(node) + if element.has_command('ignore'): + return [] + if element.has_style('display') and element.get_style('display') is None: return [] diff --git a/lib/extensions/commands.py b/lib/extensions/commands.py index 2f3006ff..b22b5d84 100644 --- a/lib/extensions/commands.py +++ b/lib/extensions/commands.py @@ -16,7 +16,7 @@ from ..svg import get_node_transform class Commands(InkstitchExtension): - COMMANDS = ["fill_start", "fill_end", "stop", "trim"] + COMMANDS = ["fill_start", "fill_end", "stop", "trim", "ignore"] def __init__(self, *args, **kwargs): InkstitchExtension.__init__(self, *args, **kwargs) |
