summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2025-01-31 22:32:58 -0500
committerGitHub <noreply@github.com>2025-01-31 22:32:58 -0500
commit384db8235ebf23d419a31b32184b810657fa980e (patch)
tree722daa7d1172b74ad3bbc1f1aba82ed5b0dc3a7f /lib/extensions
parent235fa3fc5911b649a1dbbeb2ea44a2fb02937b0a (diff)
add development-only extension functionality (#3470)
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/base.py4
-rwxr-xr-xlib/extensions/sew_stack_editor.py2
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/extensions/base.py b/lib/extensions/base.py
index 4a2895d0..91afbc38 100644
--- a/lib/extensions/base.py
+++ b/lib/extensions/base.py
@@ -18,6 +18,10 @@ from ..update import update_inkstitch_document
class InkstitchExtension(inkex.EffectExtension):
"""Base class for Inkstitch extensions. Not intended for direct use."""
+ # Set to True to hide this extension from release builds of Ink/Stitch. It will
+ # only be available in development installations.
+ DEVELOPMENT_ONLY = False
+
def load(self, *args, **kwargs):
document = super().load(*args, **kwargs)
update_inkstitch_document(document)
diff --git a/lib/extensions/sew_stack_editor.py b/lib/extensions/sew_stack_editor.py
index 6c7cb543..a7cc9e38 100755
--- a/lib/extensions/sew_stack_editor.py
+++ b/lib/extensions/sew_stack_editor.py
@@ -531,6 +531,8 @@ class SewStackPanel(wx.Panel):
class SewStackEditor(InkstitchExtension):
+ DEVELOPMENT_ONLY = True
+
def __init__(self, *args, **kwargs):
self.cancelled = False
InkstitchExtension.__init__(self, *args, **kwargs)