update menu

This commit is contained in:
2026-01-06 00:03:01 -05:00
parent e7271166e6
commit 0c61002610
3 changed files with 15 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ https://git.knoxmakers.org/KnoxMakers/km-plot
2) Copy the files from this repo into that km-plot directory
3) Restart Inkscape, then find the extension under **Extensions -> Knox Makers -> KM Plot**.
3) Restart Inkscape, then find the extension under **Extensions > Knox Makers > Vinyl Cutter > Plot**.
4) Connect your plotter via USB/serial; select the detected port in the Device tab, adjust settings as needed, and click **Send to plotter**.

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>KM Plot</name>
<name>Plot</name>
<id>org.knoxmakers.kmplot</id>
<script>
<command location="inx" interpreter="python">kmplot.py</command>
@@ -8,7 +8,9 @@
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu _name="Knox Makers" />
<submenu _name="Knox Makers">
<submenu _name="Laser"/>
</submenu>
</effects-menu>
</effect>
</inkscape-extension>

View File

@@ -5,6 +5,7 @@ import platform
import subprocess
import sys
from pathlib import Path
import ctypes
# Make bundled deps (e.g., pyserial) importable before loading inkex.
BASE_DIR = Path(__file__).resolve().parent
@@ -15,6 +16,15 @@ if DEPS_DIR.exists():
# Enable stderr logging when set True (or via KM_PLOT_DEBUG=1 environment variable).
DEBUG = os.environ.get("KM_PLOT_DEBUG", "").lower() in {"1", "true", "yes"}
# Hide the transient console window that appears on Windows.
if os.name == "nt": # pragma: win32-only
try:
hwnd = ctypes.windll.kernel32.GetConsoleWindow()
if hwnd:
ctypes.windll.user32.ShowWindow(hwnd, 0) # SW_HIDE
except Exception:
pass
import inkex
from gui import KMPlotGUI, Gtk, GLib
from plot import PlotEngine