Keep the mouse pointer visible after closing a webview from the keyboard
WebView2 runtime 152+ hides the pointer while typing and only shows it
again on a mouse event inside the webview. Closing the Speed Dial with
Enter after typing left the pointer hidden over all of OrcaSlicer until
the dial was reopened (WebView2Feedback#5687, still open on 155).
Disable the runtime's HideCursorWhileTyping feature at startup on
Windows, before any webview is created, unless the user already set
WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS.
Fixes#16868
Co-authored-by: Lam Wei Lun <weilun.lam@gmail.com>
* Report storage on every Moonraker status push
MachineObject sets the storage state on every push, first from "sdcard"
and then from home_flag bits 8-9. The Moonraker agent sent neither, so
each push reset the state to NO_SDCARD and the send dialog blocked with
"Storage needs to be inserted before printing". Moonraker printers always
have storage (virtual_sdcard), so report it in both places.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Check Moonraker Free Space Before Reporting Storage
Report storage only when the gcodes root has free space, read from
disk_usage in /server/files/directory?path=gcodes, instead of always
reporting it. The status stream checks before the subscription and again
from the read loop every 30 s. A check that fails counts as no storage.
Move the Http::get boilerplate of the device info, status, object list
and storage queries into one get_json helper.
* Ask to Insert Storage or Free Up Space Before Printing
A printer agent now also reports no storage when its disk is full, so
the messages for that state say to free up space as well. The two
"before send(ing) to printer" variants share one string.
---------
Co-authored-by: dr-apple <15102858+dr-apple@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The temperature tower re-targets the hotend at every layer with a bare
M104. Every other temperature command on a multi-tool printer names its
tool, and the firmware applies a tool-less M104 to whichever tool it
considers active, so a tower assigned to any tool but the first heated
the wrong nozzle. Pass the tool printing the tower, as the first-layer
M109 right before it already does.
When a preset or a 3mf has an enum or bool value this build cannot parse, the config loader replaces it and records a substitution. The CLI only logged these at info level, which the default log level filters out. A preset with an invalid ironing_type therefore sliced with ironing off, printed nothing and exited 0.
Each substitution is now printed to stderr and added to result.json's warnings array with the class config_value_substituted. Exit codes are unchanged, and --strict does not escalate these warnings. test_cli_strict.sh has a new case for it.
nlohmann's dump() throws type_error.316 on a string that is not valid UTF-8. Object names come from file names, which on Linux can be any bytes. In record_exit_reson() the catch-all swallowed the throw, so no result.json was written. In cli_callback_mgr_t::notify() nothing caught it, so a --pipe run aborted.
Both calls now dump with error_handler_t::replace, which writes U+FFFD in place of the invalid bytes. Output for valid UTF-8 is unchanged.
Unindexed vector placeholders like `{z_hop}` read `filament_map` as a 0-based index, so they used the wrong slot. Per-extruder options now use `filament_map - 1`, and options that filament overrides expand per filament (`filament_extruder_override_keys`) use the current filament.
Fixes#12804
Disable OK in the Save preset dialog while the name is invalid. Before, an invalid name such as an empty one could still be saved.
The Save preset and Physical Printer dialogs now share one name check, check_preset_name(). It adds three new checks: control characters, Windows reserved device names (CON, PRN, AUX, NUL, COM0-9, LPT0-9), and a length limit of 230 bytes and 150 UTF-16 units, so the save file fits within the Linux file name and Windows path limits.
multi_material_segmentation_by_painting sized its per-filament output from filament_colour, but apply_mm_segmentation reads one entry per filament_diameter. When the palette was shorter than the filament list, slicing an object painted with a filament that had no color read past the end and crashed. Size it from filament_diameter instead.
Adds a regression test that paints one side of a cube with filament 2 while filament_colour has one entry.
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>
Moonraker agents now send cols and ctype for every tray, the same fields the Bambu AMS sends. A single-color tray sends its one color with ctype 1. A multi-color spool sends all its colors once an agent fills the new AmsTrayData::tray_colors. Sending cols for every tray keeps update_filament_multi_color() from stopping at the first tray that has none.
boost::filesystem::exists() threw on Windows error 1005 for the build-time uv path, which skipped the packaged uv fallback. Use the error_code overloads so an unreadable path counts as absent, and look up uv before scoped_interpreter is created so a failure there cannot leave the interpreter running.
Every connector hole was moved 0.05 mm toward the cut face so it would open
the face instead of leaving a coplanar skin. Moving the whole volume also
moved its far end, so a plug hole was 0.05 mm shallower than depth plus
tolerance, and each dowel hole 0.05 mm shallower than depth plus half the
tolerance.
Grow the plug and snap hole by the overlap at the face instead of moving it,
and cut each dowel half just past the plane so the holes keep their depth
and still overlap the face.
The connector tests now measure each hole from the cut face, which is what
shows the missing 0.05 mm, and also run on a tilted, shifted cut plane.
Give two Eigen `auto` locals in SLAPrint.cpp and Selection.cpp concrete types so they no longer refer to destroyed temporaries. Zero-initialize two vectors in GLGizmoBrimEars.cpp, and build each wxDataViewItem before its delete in ObjectDataViewModel::Delete.
Dowels are centered on the cut plane, so the extra depth from the tolerance already splits evenly between the two holes. Only plugs and snaps are now shifted along the cut normal.
The test fix that finds the cut parts by their position in the object is from HanifKoh.
Co-authored-by: HanifKoh <76276251+HanifKoh@users.noreply.github.com>
Filament presets have no `filament_colour`, so loading two or more filaments in the CLI without `--filament-colour` left a one-entry palette. Code that sizes per-filament tables from it then read out of bounds, which crashed the slicer or dropped the layers for filament 2. The CLI now pads `filament_colour` to the filament count and rebuilds the flush matrix. Adds a CLI test that slices a per-layer change to filament 2.
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.
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.
# Description
AMS custom colors now support alpha and ordered gradients through the
shared color picker. Printers advertising manual multicolor support can
edit up to four gradient colors; other printers retain single-color
editing with alpha. The picker accepts a per-caller gradient limit while
project editing and shared favorites retain their existing seven-color
limit. Canceling or confirming an unchanged seed preserves selections
that the editor cannot represent.
Filament previews composite translucent colors over a checkerboard,
including AMS custom swatches, circles and cards, the filament rack,
Change Filament menus, object-list selectors and feature-filament
selectors. Single-color AMS, external-spool and AMS Lite cards use the
same checkerboard renderer and alpha compositing as gradient cards, with
no separate SVG checkerboard cache. Rounded AMS card fills retain their
geometry and remaining-material bounds. Generated preview bitmaps use
opaque RGB storage after compositing so Windows menu conversion does not
corrupt the numbered labels; stored RGBA colors remain intact.
The rendering uses the existing graphics-context path without alternate
rendering fallbacks. Existing project/profile formats and device
permission checks are preserved.
# Screenshots/Recordings/Graphs
AMS now can have custom gradient with alpha up to 4 colors:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/c28c0ee6-aad2-41c8-ae03-b8bd25ce1da8"
/>
Checkerboard background for colors with alpha:
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/de2af9e5-141f-4ab2-bcfe-561168c2435b"
/>
Bambu Handy should work too:
<img width="500" alt="98456ee77c51d79981ac50cd8f562e86"
src="https://github.com/user-attachments/assets/86951dbf-b898-4caa-9dc6-9407204f61fc"
/>
<img width="500" alt="b911c1c638ce71306ad1ac92587aea96"
src="https://github.com/user-attachments/assets/2f65c748-25fc-4bde-bbcf-305d0dfd3293"
/>
## Tests
- Windows, using the existing `build-dbginfo` / `RelWithDebInfo`:
`ALL_BUILD` and `slic3rutils_tests` build successfully.
- Focused native tests pass: 63 test cases, 5118 assertions, randomized
order. Includes AMS settings, device command payloads, color picker
validation and bitmap pixels, including 48 solid-versus-gradient
transparency comparisons.
- `node --test
resources/web/dialog/ColorPickerDialog/colorpicker.test.js`: 10 tests
pass.
- Manual GUI/device writeback and macOS/Linux runtime verification were
not performed.
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
The cooling buffer drops a G1 F that repeats the feedrate the preceding
travel, wipe or retraction already set, so an extrusion printed at the
travel speed reaches the adaptive pressure advance processor without a
feedrate line of its own. The processor only read standalone G1 F lines
and fell back to the last one it had seen, often the first layer's, so
the predicted pressure advance stayed at the first-layer value for the
rest of the print.
Track the feedrate every move with an F word sets, as the firmware does,
and use it for an extrusion that no G1 F precedes.
CrealityPrint::start_print() chose between the plain opGcodeFile start and the
colorMatch + multiColorPrint pair by the model id alone, and inside the
multi-colour branch it fell back to the plain start only when a filament was
mapped onto box 0. A K1-family printer reports the same model id with and
without a CFS, and without one it never answers the boxsInfo query, so the send
dialog had no slots to map and the printer received a colorMatch with an empty
list followed by multiColorPrint. The job printed, but the firmware flagged
"no material" (materialStatus 1) for its whole duration. The same happened on
any CFS-capable model whenever the boxsInfo query failed.
Treat an empty mapping like a mapping onto the spool holder and send the plain
start with enableSelfTest, which is what Creality Print does when the printer
lists no colours. The command building moves into start_print_commands(), a
pure function, so the decision is unit-tested. Every plain start now reads the
printer's answer best-effort before closing, as the non-CFS start already did,
so the close frame never follows the command in the same burst.
Fixes#16695.
* init
* update icons
* Fix macOS color sampler compilation with Xcode
* add linux support
* add more guards for portal
---------
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
* Make the Discrete GPU a Linux Preference Instead of a Desktop-Entry Hint
The desktop entries asked the launcher for the discrete GPU with
PrefersNonDefaultGPU and X-KDE-RunOnDiscreteGpu. KDE and GNOME honour
that by adding the PRIME variables to every menu launch, so on a hybrid
laptop under Wayland the 3D view was rendered by zink on the GPU that
does not drive the display and its frames never reached the compositor:
an empty Prepare and Preview canvas from the menu, a working one from a
terminal.
Drop the two keys from the installed desktop file, the AppImage's
embedded entry and the entries the Desktop Integration dialog writes.
Add a "Render on the discrete GPU" preference (Linux, default off,
requires restart) that exports DRI_PRIME and, with the NVIDIA kernel
module loaded, the NVIDIA render-offload variables before GTK opens the
display. The GDK_BACKEND=x11 opt-in path exported them unconditionally;
it now leaves GPU selection to the preference as well.
The preference acts before GUI_App loads the configuration, so
AppConfig::peek_bool reads one app boolean straight from the saved file
and xdg_config_dir resolves the default Linux data dir the way the wx
code did; GUI_App's two copies of that lookup use the same helper, and AppConfig::config_path gained a
static form so the file name lives in one place.
* Share the Linux Data-Dir Lookup and Let DRI_PRIME Override the GPU Preference
default_data_dir() in libslic3r resolves the Linux data dir a start without
--datadir uses: a portable data_dir folder next to the executable, else the
XDG config dir. GUI_App::init_app_config and the discrete-GPU start-up code
both call it, so they cannot drift apart.
A DRI_PRIME already in the environment now skips the export entirely, so one
start with DRI_PRIME=0 gets back to Preferences when the discrete GPU cannot
open the window. The tooltip says so.
* Attach the DRI_PRIME Translator Note to the Tooltip It Describes
* 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.
* 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.
When an Orca Cloud account is logged in, on_init_inner() ran fetch_plugins_from_cloud() synchronously, about 2 s of UI-thread time before presets loaded. The fetch now runs on a worker thread while presets load and the main window is created.
The "no longer available" and "unauthorized" plugin notifications are posted with CallAfter. If they arrive before post_init(), they are kept and shown from post_init(). Before this change they were never shown at startup, because plater() was still null.
The thread is joined on logout, so the fetch can't re-add the old account's metadata, and in OnExit(), CleanUp() and the macOS wxEVT_END_SESSION handler.
The Moonraker printer agent's status stream returned at once for an https print host, so Orca got the printer's first status over HTTP and no live updates after it. The stream now connects over TLS for an https print host. Like the agent's HTTP requests, it does not verify the certificate, so a printer's self-signed one is accepted. It sends the host name for SNI, and the `Host` header leaves out the default port 443.
`run_on_ui_blocking()`, added in #16763, declared its call states in an enum inside the function template. MSVC does not find those enumerators from the default member initializer of the local `struct Call`, so `libslic3r_gui` failed to compile with cl (C2065, C2280). The states are now at namespace scope as `UiCallPending`, `UiCallClaimed` and `UiCallAbandoned`. Behavior is unchanged.
Undo/redo restores a plate's name but reattaches its Print without copying the name, so `{plate_name}` in the output filename and G-code could be empty or out of date. For example, delete a named plate and then undo. `PartPlate::set_print()` now copies the plate name to the Print.
`MachineObject::connect` read `use_ssl` from `dev_ip`, which holds host:port with the scheme removed. So the Moonraker printer agent always used plain HTTP and could not reach a printer whose print host is https. It now reads the scheme from the matching `print_host`.
* Bound Plugin Disconnect and Python Shutdown When OrcaSlicer Exits
A Python printer agent whose disconnect_printer() never returned froze
the closing app, and a plugin thread that never ended kept the process
alive after its window closed, because Py_Finalize joins every
non-daemon thread.
At shutdown a Python agent's disconnect_printer() now runs once per
agent on a helper thread with a 3 second deadline, holding a reference
that keeps the plugin object alive if the call outlives a forced
unload. PythonInterpreter::shutdown() waits up to 3 seconds for running
plugin calls and for non-daemon threads; if either is still going, the
interpreter is left unfinalized for the process exit to end.
* Run the Threading Atexit Hooks Before Waiting for Plugin Threads
An idle concurrent.futures worker only ends when the hooks registered with
threading._register_atexit() tell it to, and Py_Finalize runs those after
the shutdown wait, so a plugin that left an executor open made every exit
wait the full deadline and skip finalization. The hooks now run first, on a
daemon thread joined within the same deadline, since they join their
workers without a timeout.
Boost 1.87 removed io_service and io_context::reset(), and 1.88 moved the classic Boost.Process API under boost/process/v1/ and dropped deadline_timer from boost/asio.hpp. Use io_context, restart() and steady_timer, and include Boost.Process only through the new slic3r/Utils/BoostProcessCompat.hpp, which picks the v1 headers on 1.88+. The bundled Boost 1.84 build is unchanged.
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.
FreeType was only bundled for OCCT's font code in TKService. The only Orca code that used that font code was Shape/TextShape.cpp, and nothing calls it. Its one call in ImGuiWrapper.cpp is commented out. The Emboss tool and the Design tab's text use stb_truetype.
Build OCCT with USE_FREETYPE=OFF, and remove the FREETYPE dep, its Flatpak source entry, the freetype.dll copy on Windows, TextShape, and the freetype and fontconfig links in libslic3r. OCCT only links fontconfig when FreeType is on, and libslic3r_gui links fontconfig on its own.