From 077f7ea72ba38790bf030d3181c44787fef953b6 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Tue, 6 Aug 2019 04:42:48 +0200 Subject: add Troubleshoot extension (#465) adds an extension to help you understand what's wrong with an object and how to fix it, e.g. "invalid" fill shapes --- lib/commands.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/commands.py') diff --git a/lib/commands.py b/lib/commands.py index c735185f..908c6e53 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -371,3 +371,22 @@ def add_commands(element, commands): pos = get_command_pos(element, i, len(commands)) symbol = add_symbol(document, group, command, pos) add_connector(document, symbol, element) + + +def add_layer_commands(layer, commands): + document = get_document(layer) + correction_transform = get_correction_transform(layer) + + for command in commands: + ensure_symbol(document, command) + inkex.etree.SubElement(layer, SVG_USE_TAG, + { + "id": generate_unique_id(document, "use"), + INKSCAPE_LABEL: _("Ink/Stitch Command") + ": %s" % get_command_description(command), + XLINK_HREF: "#inkstitch_%s" % command, + "height": "100%", + "width": "100%", + "x": "0", + "y": "-10", + "transform": correction_transform + }) -- cgit v1.2.3