Skip to content

feat: link a spool to your own OrcaSlicer preset; Send to Spoolman acts on the picked preset - #62

Merged
bloodf merged 1 commit into
mainfrom
feat/preset-link
Nov 17, 2026
Merged

bloodf merged 1 commit into
mainfrom
feat/preset-link

Conversation

@bloodf

@bloodf bloodf commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Summary

Fix for #38: Send to Spoolman

  • Root cause: edited_changes() compared the edited preset with filaments.find_preset(edited.name). For the selected preset, OrcaSlicer's find_preset() returns the edited copy itself (PresetCollection::preset(idx, real=false), Preset.hpp), so the comparison never found a change. Automatic sending of edits had the same bug. It now compares with get_selected_preset(), the saved preset the edited copy was made from.
  • The button moved from the toolbar to the spool's detail. Next to it is an OrcaSlicer preset choice of that spool's presets: one per printer, or the linked one. Send acts on the preset picked there, never on whichever preset was opened last.
  • If the picked preset has no unsaved edits, Send now replies "nothing to send" instead of failing. For a linked preset of your own, it sends the saved settings that differ from the preset Spooler would build for the selected printer.
  • Presets are read on the UI thread, where page messages arrive. The write runs on a worker.

Link a spool to your own preset (the reporter's suggestion; same convention as u1control#11)

  • orca_filament_preset is a Spoolman text extra field holding the preset name, JSON-encoded like every extra value. It is read from the spool first, then from its filament.
  • Edit Spool has an OrcaSlicer preset choice for the spool and one for its filament. Each lists your own filament presets, and you can also type a name. The field is added to Spoolman the first time a link is saved, the same way as Use with.
  • Sync Presets makes no preset for a linked spool. With presets per filament, it makes none for a linked filament.
  • profile_for_spool() answers the linked name, so Load Printer Filaments and Keep Slots Synced pick your preset.
  • Listing your own presets can't break the snapshot: a failure is logged once and the list is empty.
  • Strings are in en, pt-BR, es, de, zh-CN and pl. The guide, how-it-works, both READMEs' FAQ and the CHANGELOG are updated.

Test plan

  • ruff check plugin scripts tests, scripts/check_version.py
  • Python suite: 709 tests OK. New tests/test_preset_link.py covers field parsing (including JSON null, bool, list and dict), the spool-then-filament fallback, skipping linked presets in Sync Presets, the linked preset being picked for slots, and sending on the picked preset (unsaved edits, another preset left alone, nothing to send, saved settings of a linked preset). It also checks that presets are read on the UI thread and sent off it, and covers the editor's field creation, save and clear.
  • The fake PresetCollection in test_send.py now behaves like OrcaSlicer (find_preset() returns the edited copy). The old fake hid the bug.
  • UI unit tests 58/58, page tests 84/84 (S03 rewritten for the detail's Send, plus a new editor link test).
  • Not yet tried in a real OrcaSlicer. The store and README images were not re-rendered, so they still show the old toolbar button.

Closes #38

…oolman acts on the picked preset

orca_filament_preset, a Spoolman text extra field on the spool (else its
filament), names one of your own filament presets. Edit Spool offers the
choice and adds the field. A linked spool gets no Spooler preset, and
the linked one is picked wherever Spooler would pick its own.

Send to Spoolman compared the edited preset with find_preset(), which
returns the edited copy for the selected preset, so it never found a
change (automatic sending had the same bug). It now compares with the
selected (saved) preset, lives in the spool detail and acts on the preset
picked there. With no unsaved edits it says so, and for a linked preset
it sends the saved settings that differ from Spooler's.

Closes #38
@bloodf
bloodf merged commit 8c6238d into main Nov 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Never updates Filament Profile

1 participant