Commit Graph
1455 Commits
Author SHA1 Message Date
SoftFever d6447efdb4 Merge branch 'main' into feature/mcp 2026-11-01 01:27:31 +08:00
SoftFever 913c622574 Remember the last printer and keep AMS-synced filaments across restarts (#17086) 2026-11-01 00:26:17 +08:00
SoftFever 27cafaa06c Read nozzle diameters correctly when the UI language uses a decimal comma (#17079) 2026-10-31 20:35:45 +08:00
SoftFever d6e2cd0a46 Merge branch 'main' into feature/mcp 2026-10-31 18:23:32 +08:00
Kris Austin eda4062d68 Fix crash opening a project with missing or empty settings (#17040)
fix: crash opening a project with missing or empty settings

load_files reads filament_colour from the project config before the
defaults are merged in, and uses it without a null check. A 3MF whose
project_settings.config has no filament_colour crashes on open. The
2.3.1-alpha migration reads sparse_infill_rotate_template and
sparse_infill_pattern the same way.

Check those reads for null. A missing filament_colour keeps the count
at 1, and a missing infill pattern falls back to the default the merge
would apply. The two identical 2.3.1-alpha migrations become one lambda.

The 2.3.1-alpha and newer-version branches also skipped the empty-config
check, so an empty project config reached the same reads. Send every
project config the load skips through one fallback that loads the
geometry only and logs it. It keeps each branch's notice, and a
config-only import now says the 3MF has no project settings OrcaSlicer
can import instead of claiming to load geometry. A same-version file no
longer calls itself old.

Geometry-only imports decided by these checks never added filaments for
objects assigned past the first, because that step ran before them. Run
it after the checks. Count project filaments per file, and drop the two
branches at the end of the chain that no file type reaches.

Fixes #17008
2026-10-31 01:45:47 +08:00
SoftFever a4dffc92de Merge branch 'main' into feature/mcp 2026-10-30 23:53:28 +08:00
Ian Bassi 3bc827066d Fix tooltip line breaks and ambiguous msgids in all languages (#17055) 2026-10-30 12:52:34 -03:00
HanifKoh 6112429980 Tell a Printer Without a Filament System Apart From an Unreachable One When Syncing (#17021)
Synchronize filament list showed "OrcaSlicer can't connect to <printer>"
whenever the filament list came back empty. For pull-mode agents that is
also the normal outcome on a reachable printer that has no AMS, CFS or
other multi-material unit, so every such Moonraker printer was reported as
powered off or off the network.

When the printer is online and has already reported its status, explain
that it lists no filament system instead.
2026-10-30 02:59:21 +08:00
SoftFever 86a88267a8 Merge branch 'main' into feature/mcp 2026-10-29 20:22:16 +08:00
SoftFever db75a6dc37 Let MCP clients do the OrcaSlicer tasks the agent benchmark found missing 2026-10-29 20:02:27 +08:00
SoftFever 0db324476f Fix crash on New Project after opening the Design tab (#16997)
# Description

Starting a new project or opening one could crash OrcaSlicer if the
Design tab had been opened earlier in the session and OrcaSlicer wasn't
the active window at that moment. It no longer crashes, and the Design
tab is still cleared for the new project as before.

Only reachable with the CAD feature turned on. No change to slicing or
to project files.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->

## Tests

Reproduced on a Windows Release build of a feature branch that has the
same code, by driving New Project with OrcaSlicer visible but not the
active window and a debugger attached. Before the change it crashed with
the same stack as the original crash log. After it, the same steps
finish without a crash. This branch (main plus the change) wasn't built
on its own. There's no automated test, because the crash needs a real
change of window focus.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-10-29 14:03:19 +08:00
Lam Wei Lun c0efd44e56 Fix Publish 3MF export and import of filament variants (#16984)
* Fix Publish 3MF export and import of filament variants

Variant-bearing filament keys (filament_options_with_variant) hold one
value per (slot, variant) in the uncompacted config, but the published
path addressed them by slot: export kept the wrong column once an
earlier filament had more than one variant, import wrote every material
key to receiver variant 0, and Full Publish copied a single variant.

Add a column model in PublishSettings: file columns from
filament_self_index, exact variant matching, and the column a slot
actually prints with (filament_map / filament_volume_map / nozzle
types, hybrid mapped through the slot's own volume type). Export
rewrites partial material entries to base#col, masks those keys by
column instead of slot, and drops a key whose column is foreign, out of
range, or whose vector does not match the file layout. Import maps
base#col back to the receiver preset's variant with the same name and
skips (reports) a miss instead of writing variant 0; plain keys from
older publishes keep the positional import. Full Publish copies every
variant of the author's slot and sets the copy's
filament_extruder_variant.

No new file keys: variant-bearing material keys gain a #col suffix.
No UI change in this commit.

* Fix missing includes

* Fix unit tests

* Fix unit tests
2026-10-29 10:55:35 +08:00
SoftFever ba756706be Fix crash on New Project after opening the Design tab 2026-10-29 03:02:17 +08:00
SoftFever 5c05a8e662 Merge branch 'main' into feature/mcp 2026-10-28 23:32:22 +08:00
Nathanandyw4z 7349ea795b Fix STL export creating duplicate file extensions (#15296)
Strip known model extensions from object names in per-object STL export, so `bracket.stl` exports as `bracket.stl` instead of `bracket.stl.stl`. Leading and trailing dots and spaces are trimmed too, so names like `.stl` no longer become hidden files.

Co-authored-by: yw4z <ywsyildiz@gmail.com>
2026-10-28 09:14:35 -05:00
SoftFever f4f997b8e0 Let a cancel stop an MCP slice that is still waiting to start 2026-10-28 19:43:10 +08:00
SoftFever 964fa5e741 Say which queued automatic reslice a cancel drops 2026-10-28 19:43:10 +08:00
SoftFever c7b9cd6741 Drop the automatic-reslice due-time check that wx timers make unnecessary 2026-10-28 19:43:10 +08:00
SoftFever d8e41ea138 Count only runs a slice request started as the MCP slice's own, and ignore stale auto-reslice timer events 2026-10-28 19:43:09 +08:00
SoftFever fb918fa900 Keep a queued automatic reslice from overtaking a later delayed one 2026-10-28 19:43:09 +08:00
SoftFever 603d38b9c9 Report a refused MCP slice request as an error, and keep cancelled automatic reslices from running 2026-10-28 19:43:09 +08:00
SoftFever 1f06eda308 Report each plate from the MCP slice's own run, and drop a queued automatic reslice on cancel 2026-10-28 19:43:09 +08:00
SoftFever 23f04a5bc4 Keep MCP slice results standing and free the service only once idle
A slice requested after an MCP slice finished no longer marks it superseded, a slice already
running when MCP asks counts as its own, and Slice All reports an invalid plate's validation
message. The Preview tab shows after an MCP slice, as after the Slice button. Point settings
accept [x, y] pairs, a ui_mouse move drags while a button is held, a tab can be captured, and
dialog rules a client sets after the server is turned off are refused.
2026-10-28 19:43:09 +08:00
SoftFever c8c37986ac Keep MCP calls safe across shutdown and UI rebuilds, and attribute slices to their own runs
Also handles non-ASCII paths on Windows, lets file pickers only be auto-cancelled, ends a client's auto-answers when the server is turned off, gives the stdio bridge deadlines, and adds notebook tabs, ImGui checkboxes and index-aware locators to GUI automation.
2026-10-28 19:43:09 +08:00
SoftFever 367030a20e Capture a single widget or window by ref, cancel a given job, and count a pending auto-reslice as slicing 2026-10-28 19:43:09 +08:00
SoftFever 47747478d5 Keep plate selection from superseding an MCP Slice All 2026-10-28 19:43:09 +08:00
SoftFever dc522e59e4 Start an opt-in MCP server with slicer, preset, action and screenshot tools 2026-10-28 19:43:09 +08:00
Lam Wei Lun aa3291b380 Publish per-extruder process settings in the Publish 3MF dialog (#16971)
* Publish per-extruder process settings in the Publish 3MF dialog

Process settings that differ per extruder (speeds, accelerations, jerk,
top surface flow ratio) were published as one row showing extruder 1 and
exported as the whole vector, so the dialog could not select an extruder's
value and checking the row shipped every extruder's value.

- Dialog: one tab per extruder, as in the Printer section. On a
  multi-extruder printer the tabs sit behind a MultiSwitchButton below the
  page tabs; each row is keyed "key#N" and reads the uncompacted config.
  Pre-check follows each row's own key. Single-extruder printers get one
  "Extruder" page tab.
- Export: "key#N" process keys are masked to the checked slot, as printer
  keys already are.
- Import: the file carries the author's print extruder layout. Process keys
  map by extruder number and nozzle type on multi-extruder receivers.
  Single-extruder receivers keep the positional import. Files without the
  layout keep the positional import.
- Reopening a file without the layout: its "key#N" process entries select
  that setting on every extruder, so re-publishing keeps the values it had.
- MultiSwitchButton gains Unselect(), which clears the selection without
  an event.

* Fixes clang-tidy

* Fix per-extruder masking test to use the nullable outer_wall_speed type

outer_wall_speed is ConfigOptionFloatsNullable, so the ConfigOptionFloats
casts in the test returned null and the test segfaulted.
2026-10-28 15:55:22 +08:00
Ian ChuaandLam Wei Lun 3a0517831f fix: warn on preset save when plugin not found (#16929)
* fix: warn on preset save when plugin not found

* refactor: build the unsaved-changes save config in one place

* Fixes clang-tidy

---------

Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
2026-10-28 13:02:05 +08:00
Fernando Marino` 5897d95d4d Fix filament slot editor desync across multi-material presets (#15896)
On printers where a filament slot's edit button opens the editor directly (IDEX, toolchanger, multi-extruder), cancelling the unsaved-changes dialog wrote the preset still open in the editor into the clicked slot.

- `switch_to_tab()` now compares the slot's assigned preset with the one open in the editor to decide whether to reload.
- The edit button sets `editing_filament` only after `switch_to_tab()` succeeds, as `Sidebar::edit_filament()` does.
- `UnsavedChangesDialog::build()` checks the `find_preset()` result for null.

Fixes #15767
2026-10-27 21:00:02 -05:00
Lam Wei Lun 97e6c71793 Fix Publish 3MF showing Undefined for extra printer extruders (#16940)
* Fix Publish 3MF printer extruder values showing Undefined

The Publish dialog indexed printer per-extruder rows by variant column
but read them from full_config(), which compacts those vectors to one
slot per extruder. Read the Printer rows from full_config(false) instead.

Inherited printer per-variant vectors also kept the root's length, so a
printer with more variants than its root had no value for the extra
variants. Pad them to the printer's variant count after inheritance.

* Map published printer keys to the receiver's extruder with the same number

A published printer key used to land on the receiver's slot with the
same index, so the author's layout decided the target. Files now carry
the author's printer_extruder_id and printer_extruder_variant. On import,
each key goes to the receiver's extruder with the author's number, when
that extruder currently runs the author's nozzle type. Anything else is
left unapplied and reported. Files without the layout keep the positional
import.

* Fix clang-tidy
2026-10-28 08:42:10 +08:00
Grzegorz Libiszewski 6d2869c430 Allow network upload of manual multi-material prints to Flashforge printers without IFS (#15547)
Uploading a multi-filament plate to a Flashforge printer failed with "Enable IFS" even when the printer has no IFS and the profile uses Manual Filament Change. The upload dialog now skips the IFS requirement when Manual Filament Change is on, and starts with IFS unchecked in that case on printers that have one.

Fixes #15307
2026-10-27 15:28:44 -05:00
TheLegendTubaGuy b6ca378b23 Apply the print dialog's Box mapping on Qidi printers (#16723)
With printer agents on, the Qidi agent now uses the Box slot picked for each filament in the print dialog. After the upload it writes `SAVE_VARIABLE VARIABLE=value_t<n> VALUE="'slot<m>'"` for each mapped filament, which the firmware's T<n> macros read. Then it starts the print through `/printer/print/start`, because the Max 4, Q2, Q2C and Plus 5 only open prints from the copy that Moonraker's print start makes.

- `MoonrakerPrinterAgent::start_local_print` now ends with a virtual `print_uploaded_file()`. The default still sends `SDCARD_PRINT_FILE`, so other Moonraker agents are unchanged.
- Box units show as "Qidi Box 1", "Qidi Box 2". Agents can set an optional `display_name` on an AMS unit.
- New agent flag `native_device_tab`. Qidi sets it to false, so its native Device and Calibration tabs are hidden and the web page becomes the Device tab.
- The Moonraker agent retries its first connection with the status stream's backoff. A disconnect, a newer connection or closing the app stops the retries.
- The print dialog fetches filament data itself for agents that only send it when asked, so the slot picker shows the Box units without a sidebar sync.
- Agent printers show their address in the print dialog's printer list instead of "(LAN)". Bambu printers keep "(LAN)".
- A single nozzle whose size the printer hasn't reported shows no size instead of "Unknown".
2026-10-27 10:47:06 -05:00
yw4zandcook0001 ab24043937 Make plate renames undoable and refresh G-code that uses {plate_name} (#16900)
Renaming a plate now creates an undo snapshot, so a rename is its own undo step and marks the project as modified. All four rename paths use the new `Plater::rename_plate()`.

When a G-code template uses `{plate_name}`, renaming a sliced plate invalidates only the G-code export step, so the next slice only re-exports the G-code. `filename_format` is excluded because the file name is built from the current plate name at export time.

The "Rename Plate" undo snapshot is from #16141.

Co-authored-by: cook0001 <79376116+cook0001@users.noreply.github.com>
2026-10-26 13:25:16 -05:00
Ian Bassi 0ef9015904 Ask for the size of a primitive when adding it (#16848) 2026-10-26 15:01:47 -03:00
TheLegendTubaGuy aa069d90fb Fix plates keeping stale objects after a cut (#16881)
The cut and "Delete all connectors" removed objects without telling the plates, so the plates kept counting objects by their old index. Prime tower previews showed another plate's filaments, and Select All picked up objects from other plates.

Removing a whole object now also removes every instance of it from the plates, not just the first one.
2026-10-26 07:46:30 -05:00
Lam Wei Lun e021ccb316 Fix missing-plugin notices not appearing on preset switch (#16897)
The notices were rebuilt only during plate validation, so selecting a
preset that needs a missing plugin on an empty plate showed nothing.
new_project() cleared the notices but kept their shown state, so they
never came back.

Refresh the notices on every preset change or edit, when a plugin loads,
unloads or has a capability disabled, after a plugin is deleted or
unsubscribed, and at the end of new_project(). A notice that is no
longer on screen is pushed again even when its set of plugins is
unchanged.
2026-10-26 18:10:23 +08:00
SoftFeverandSoftFever acb4cce4ae Explain why settings are hidden or disabled (#16657)
* Record option availability reasons per settings tab

* Explain option restrictions in field and label tooltips

* Show option restriction reasons in settings search

* Explain support and raft option restrictions

* Explain print option dependency restrictions

* Explain printer and filament option restrictions

* Declare settings owner lookup in the Tab header

* Reuse repeated option availability reasons

* Fix availability tooltips for synthetic options

* Deduplicate availability reasons in row tooltips

* Keep motion limit availability consistent with disabled controls

* Show availability reasons in object table settings

* Explain filament override retraction dependencies

* Explain disabled preset compatibility conditions

* Stop search and Speed Dial from refusing settings that are visible

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-10-26 13:59:47 +08:00
HanifKoh d0966a0502 Forward Declare PartPlate and Other GUI Types in Plater.hpp (#16840) 2026-10-26 12:40:40 +08:00
HanifKoh 2a6e7a199b Forward Declare GUI Panels in MainFrame.hpp (#16842)
* Forward Declare GUI Panels in MainFrame.hpp

* Include wx/statline.h Directly Where wxStaticLine Is Used

The Windows builds failed in AboutDialog.cpp because MainFrame.hpp no longer brings in wx/statline.h.

* Include BBLTopbar.hpp Directly in GUI_App.cpp

The Windows builds failed in GUI_App.cpp with member access into incomplete type BBLTopbar.
2026-10-26 12:40:27 +08:00
HanifKoh cbbe590230 Trim Heavy Includes From GUI_App.hpp (#16841)
* Trim Heavy Includes from GUI_App.hpp

* Include winternl.h in the Windows Troubleshoot Dialog Code

The Windows builds failed in TroubleshootDialog.cpp with unknown type name NTSTATUS.
2026-10-26 12:39:32 +08:00
Sergei 51dfa8fe7a Fix first-layer bbox in plate_N.json being shifted by the plate origin (#16860)
get_first_layer_bbox() already returns plate-local coordinates, and generate_first_layer_bbox() subtracted the plate origin from them a second time. On every plate after the first, bbox_all and bbox_objects in plate_N.json ended up outside the bed. The CLI export path already wrote plate-local values, and the wipe tower handling is unchanged.
2026-10-25 14:25:22 -05:00
SoftFever 8efa90c763 Merge branch 'main' into dev/option-unavailability-reasons 2026-10-26 02:19:01 +08:00
TheLegendTubaGuy a57a0d10a0 Hide the sidebar nozzle card when a multi-tool printer has nothing to choose (#16803) 2026-10-24 14:02:40 -03:00
Noisyfox bfd3002875 Merge upstream/main and retain motion limit availability reasons
Follow the removal of silent_mode by updating only motion limit index zero, preserving disabled tooltips and visible controls.
2026-10-23 22:21:29 +08:00
SoftFever 30ceeee18d Fix the Newer 3MF Warning for Alpha and Beta Projects in Nightlies (#16791)
# Description
<!--
> Please provide a summary of the changes made in this PR. Include
details such as:
  > * What issue does this PR address or fix?
  > * What new features or enhancements does this PR introduce?
> * Are there any breaking changes or dependencies that need to be
considered?
-->

Fixes #16771. Opening a project saved by 2.5.0-alpha in a nightly shows
"The 3MF file version 2.5.0-alpha is newer than OrcaSlicer's version
2.5.0-dev, found the following unrecognized keys:", followed by an empty
list.

Three things cause this:

- `semver.c` ranks `dev` below every other prerelease. Nightlies stay on
`x.y.z-dev` after the alpha and beta are tagged on the release branch,
so every alpha or beta project looked newer than the nightly opening it.
- `silent_mode` was retired: `handle_legacy` drops it on load, and
nothing can set it. It was still defined, though, so it was written into
every project. Every project then reported it as an unrecognized key on
load, and every project from a newer version took the "unrecognized
keys" branch of the warning. For the project in the issue it is the only
key reported.
- The warning never printed the keys it found, so the list was blank.

## Changes

- Rank `dev` above the other prereleases of the same version and below
the release: alpha < beta < rc < dev < release. This also changes two
other places that compare against the app's version:
- A project saved by a `x.y.z-dev` nightly now counts as newer when
opened in that version's alpha or beta.
- The update check, with prereleases enabled, no longer offers that
version's alpha or beta to nightly users. It still offers the release.
- Remove the `silent_mode` option, so projects no longer save it, along
with the code that only read it: the Normal/Silent columns on the
printer's Motion ability page, the Normal/Silent label in the
unsaved-changes dialog, and the switch that enabled the stealth time
estimator. Since the value was always false, none of these ran. The key
stays in the obsolete set, so older projects that contain it still load.
- List the unrecognized keys in the newer-version warning. The UI
strings are unchanged, so existing translations stay valid.

Projects saved before this change still carry `silent_mode`, so the
warning lists it when one of them is newer than the running version.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
Before:
<img width="860" height="200" alt="before"
src="https://github.com/user-attachments/assets/5d067ae1-5cfb-40b4-8973-3ac10cf2aeb9"
/>

After:
<img width="860" height="200" alt="after"
src="https://github.com/user-attachments/assets/2ef2401e-e869-4ae8-84f6-8730494c13c0"
/>

## Tests

<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->

- New `[Semver]` cases: dev ranks above alpha, beta and rc and below the
release of its version; two dev builds compare equal. They fail without
the `semver.c` change.
- New `[Config]` case: a full config has no `silent_mode`, and loading
one that has it drops it and reports it as unrecognized.
- On Linux, loaded the project from the issue in a `2.5.0-dev` build.
Before: the warning with an empty list. After: no warning. The same
project relabelled as 2.5.0 and given an unknown key shows the warning
listing that key and `silent_mode`.
- Re-saved the project from the CLI: `silent_mode` is no longer in
`project_settings.config`.
- Sliced the project before and after: identical moves and time
estimates; only the settings comments differ.
- `tests/libslic3r` and `tests/fff_print` pass on Linux. The STEP case
"A cone with a slightly tilted seam imports as a closed mesh" fails
locally on main too. The profile tool tests pass.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-10-23 18:47:11 +08:00
SoftFever e0af998078 Tidy the Unrecognized Key List and Drop an Unused Stealth Setter 2026-10-23 18:45:59 +08:00
Hanif Koh 23ed61843e List the Unrecognized Keys in the Newer 3MF Version Warning
The warning said it found unrecognized keys but never printed them.
2026-10-23 16:08:48 +08:00
HanifKoh 04a9aecf01 Let OrcaSlicer Exit After a Device Warning Dialog Was Shown (#16764)
wx leaves the main loop only when no other top-level window exists,
hidden ones included. The unsupported-control and chamber temperature
warnings were parentless frames that are hidden, never destroyed, and
the printer parts dialog was heap-allocated without being destroyed, so
after any of them had been shown the process stayed alive once the main
window closed. Parent the warnings to the main frame and put the parts
dialog on the stack.
2026-10-23 15:48:59 +08:00
HanifKoh 5b39df5723 Stop the Slicing Thread Before a Project Reset Frees Its Print (#16762)
Closing the app, starting a new project or opening another one while a
slice was still generating perimeters or infill deleted the plate prints
under the running background thread, which crashed with a segfault or a
corrupted heap. Deleting a Print only cancels the thread once a
print-level step has started, so stop the background process before
reinit() deletes the prints.
2026-10-23 15:48:15 +08:00