Files
Sebastian f2e71f63c5 feat: open models in any installed slicer and download from the same menu (#133)
* feat: open models in any installed slicer and download from the same menu

The slicer configuration now takes every slicer installed on the computer,
not just one. A model's main button opens the last one used; its arrow lists
the others, downloads the chosen file and, with several files, all of them
as a zip. That replaces the separate "Download model files" button.

Which file the actions apply to is picked in a compact file box above the
button, instead of in the button's own dropdown.

User.slicer stays the slicer the button opens; the new User.slicers lists
the installed ones, seeded from the old choice. A PATCH with only `slicer`,
as older frontends send it, still works and adds it to the list.

* fix: keep the saved slicer with an older backend and count only zipped files

An older backend answers GET /settings/slicer with `slicer` alone, which left
no installed slicers and turned the model's main button into a download.
getSlicer now treats that slicer as the one installed, for both the hook and
the configuration panel.

The zip holds the plates and supporting files, not the prepared print, so
"Download all N files" counts the plates only, as it did before.

* fix: lock slicer settings while changing them and read older PATCH replies

setUserSlicerSettings read, computed and wrote without a lock, so two changes
at once (two tabs, two devices) could each undo the other's. It now runs in a
transaction that locks the user's row first.

An older backend also answers PATCH /settings/slicer with `slicer` alone,
which left the cached settings without a list. GET and PATCH replies now go
through the same fallback.

* fix: switch one slicer at a time so another device's toggle stays

The configuration panel sent its whole list, so two devices that loaded the
same settings and each switched a different slicer kept only the later one;
the row lock can't help with a stale list. PATCH /settings/slicer now takes
`enable` and `disable`, applied under the lock to the list as it is, and the
panel sends those.

The concurrency test now sends four overlapping slicer-only changes and
checks all four are kept, which fails without the lock.

* fix: save slicer toggles one at a time so a late answer can't win

Two quick toggles in the configuration panel sent overlapping PATCHes, and
an older answer arriving last put an outdated list in the panel and the
shared cache. Saves now queue: the panel shows its own toggles until the
last save is back, then the server's answer to it, which also undoes any
that failed.
2026-10-22 21:58:04 +02:00

39 lines
1.6 KiB
Markdown

# Open in your slicer
**Open in Slicer** on a model page hands a file straight to the slicer on your computer, without saving it somewhere
first. When a model has several files, pick one in the **Files** box above the button; opening and downloading both
use it.
The button opens the slicer you used last. Its arrow lists your other slicers, downloads the chosen file, and, for a
model with several files, downloads them all as a zip.
Supported slicers:
- Bambu Studio
- OrcaSlicer
- PrusaSlicer
- Cura
- Creality Print
- Anycubic Slicer Next
- Elegoo Slicer
- Snapmaker Orca
Switch on the ones you have installed under **Configuration → Slicer**, from the user menu: double-click a slicer, or
right-click it and choose **Activate** (or **Deactivate**). With none switched on, or only **Other / Manual**, the
button downloads the file instead, for when you'd rather open files yourself.
## Thingport Bridge
Bambu Studio, PrusaSlicer, Cura and Anycubic Slicer Next won't open a link from a self-hosted server on their own.
[Thingport Bridge](../../bridge/README.md) is a small helper app for Windows, macOS and Linux that takes the link from
Thingport and opens the file in the slicer. Download it from Thingport's **Downloads** page.
## MakerWorld models in other slicers
MakerWorld files are Bambu Studio projects, which many other slicers open without their colours or print settings. For
those, Thingport offers **Open normalized**, which opens a converted copy instead. See
[normalized MakerWorld 3MFs](normalized-3mf.md).
Opening a model in a slicer counts towards its prints on the [dashboard](dashboard.md) and shows up in your
[activity](profile-and-activity.md).