# Description
Adds a fifth Python plugin capability type, `ResourceTexture`, which
contributes
height-map textures to the Texture Displacement picker. A plugin returns
a
directory of images; they appear as selectable textures in the picker,
grouped
under one collapsible section per pack. Disabling or uninstalling a pack
removes
them again, and projects that already use one of its textures keep
working,
because a layer holds its own image bytes.
**The plugin-facing contract** is one method:
```python
class WoodPack(orca.resource_texture.ResourceTexturePluginCapabilityBase):
def get_name(self):
return "Wood Pack"
def get_texture_dir(self):
return os.path.join(os.path.dirname(__file__), "textures")
```
The host scans one non-recursive level of that directory, accepting the
same
formats a hand-picked image already accepts (`.png/.jpg/.jpeg/.bmp`),
and decodes
them through the same `load_texture_image_data()` the picker uses for
the user's
own images, so a pack texture and a hand-picked one behave identically.
**Distribution is `.whl` only for v1.** `install_plugin` copies exactly
one
file, so a `.py` plugin cannot ship sibling images; a wheel is a single
file and
the loader already extracts it on demand.
**Files of interest**
- `src/slic3r/plugin/pluginTypes/resourceTexture/` — the capability, its
trampoline and its pybind base, mirroring the Pages type.
- `src/slic3r/plugin/host/PluginResourceTextures.{hpp,cpp}` — host
registry,
free of wx and GUI includes so it can sit beside `PluginManager`.
- `src/slic3r/GUI/TextureLibrary.{hpp,cpp}` — the third texture source,
the
`pack_name` provenance on an entry, and a generation counter.
- `src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp` — the picker.
- `src/slic3r/plugin/PluginFsUtils.{hpp,cpp}` —
`collect_resource_texture_files()`.
**Behaviour change worth a reviewer's attention:** the picker popup is
now a
fixed size that scrolls rather than sizing itself to its content, and it
gains
one collapsible section per pack. The sizing applies to every user, not
only
those with packs installed. With no packs installed the picker otherwise
behaves
exactly as before.
**Not in scope for v1:** folder or `.zip` install for non-programmers,
and
preset-referenceable pack textures (which would need a plugin-backed
`ConfigOptionDef::plugin_type`).
# Screenshots/Recordings/Graphs
https://github.com/user-attachments/assets/b96787cf-b475-4698-826d-5db8b9f386f1
## Tests
New suite `tests/slic3rutils/test_plugin_resource_texture.cpp`, 19
cases:
- Validator: a file inside the root is listed; a parent-directory escape
and an
absolute directory outside the root are refused; a symlink pointing
outside is
skipped; files in a subdirectory are not listed; non-regular entries are
skipped; the extension whitelist is case-insensitive and rejects
near-misses;
the listing stops at 64 files; a missing directory yields an error.
- Listing and lifecycle: a pack's images appear and clear on disable and
unload;
an empty pack contributes nothing; two distinctly named packs each stay
one
contiguous run; a second pack declaring a loaded capability name is
refused;
reinstalling with different bytes at the same path changes the decoded
content.
- Hostile overrides: `get_texture_dir()` returning `data_dir()` or
`resources_dir()` is refused and the pack loads with no textures; a
raising
override still loads the pack.
- Decoding: PNG and BMP from a pack decode through the same path as the
same
files picked by hand.
- Persistence: a project keeps a pack texture after the pack is
uninstalled,
bytes unchanged across a re-save.
- Wheel metadata: a minimal resource-texture wheel is accepted.
Known gaps, for transparency: the wheel path is covered only at the
metadata
gate, not through a full extraction-and-import lifecycle; there is no
test for a
registry callback after interpreter shutdown, as there is no seam for it
without
reaching into `src/`; and `.jpg` decode parity is covered by the listing
rather
than by a real fixture, since no JPEG encoder is available to synthesise
one.
Manually exercised in-app on Linux with a locally built pack wheel (five
colour
PNGs): install, enable, textures listed under the pack's own section,
then
disable and uninstall remove them. The new suite itself has not been run
locally — CI is the first execution.
* Linux: only disable WebKit compositing for WebKitGTK older than 2.42
The default Wayland path set WEBKIT_DISABLE_COMPOSITING_MODE=1 whenever the
session had both DISPLAY and WAYLAND_DISPLAY, i.e. any Wayland session with
XWayland. That forces WebKitGTK accelerated compositing off and also disables
threaded scrolling, so the Device tab web view (Mainsail/Fluidd) lagged unless
the app was launched with GDK_BACKEND=x11, the only path that skipped the
variable. Disabling compositing also turns off threaded scrolling.
The XWayland compositing bug the fallback worked around is fixed in WebKitGTK
>= 2.42, so apply it only for older WebKit. WebView::NeedsCompositingWorkaround()
reads the runtime WebKitGTK version; the X11 opt-in path is unchanged.
Behavior is unchanged on WebKit < 2.42, on pure X11, and on native Wayland
without XWayland. The wxWidgets skill reference is updated to match.
* Linux: use WebKit's shared-memory transport for the NVIDIA DMABUF renderer
The Device tab web view is slow on NVIDIA proprietary drivers even with
accelerated compositing left on: since the DMABUF renderer became the
default in WebKitGTK 2.42, the driver cannot back it, and web views fall
back to a slow path. Gating the old WEBKIT_DISABLE_COMPOSITING_MODE
fallback on WebKit < 2.42 is the wrong axis, because the failure is
version-independent from 2.42 on.
Force the shared-memory transport with WEBKIT_DMABUF_RENDERER_FORCE_SHM=1.
That keeps compositing and threaded scrolling and skips only the hardware
path. Also set WEBKIT_FORCE_DMABUF_RENDERER=1, which clears the isNVIDIA()
early return that Debian/Ubuntu/openSUSE patch into
rendererBufferTransportMode() and which otherwise returns before the
FORCE_SHM check is reached.
Both are set before the X11-vs-Wayland split so the workaround also covers
XWayland, and only when WebKitGTK is new enough to honour FORCE_SHM
(>= 2.44, WebView::SupportsForceSharedMemory()).
The AppImage launcher exported the superseded
WEBKIT_DISABLE_DMABUF_RENDERER=1, which is read first, leaves the transport
set empty and so disables compositing outright; replace it with the same
pair. The wxWidgets skill reference is updated to match.
* Linux: drop the AppImage WebKit DMABUF exports; correct the skill notes
The launcher cannot gate on the runtime WebKitGTK version, so exporting
WEBKIT_DMABUF_RENDERER_FORCE_SHM/WEBKIT_FORCE_DMABUF_RENDERER there would
clear a distro isNVIDIA() guard on hosts older than 2.44, where FORCE_SHM
is ignored, re-exposing the broken hardware path. The binary already sets
both with the correct gate, so remove them and say who owns the workaround.
Also correct two claims in the skill reference. An empty transport set only
means "no accelerated compositing" from 2.44 on; 2.42/2.43 still fall back
to the Wayland/X11 renderers, removed in the same release that added
FORCE_SHM. And threaded scrolling is off by default in 2.44/2.45 (on from
2.46), so FORCE_SHM keeps compositing rather than scrolling. Document the
module-level detection cost and the WEBKIT_DMABUF_RENDERER_FORCE_SHM=0
opt-out.
* Flatpak: force WebKit's shared-memory transport instead of disabling DMABUF
The entrypoint exported WEBKIT_DISABLE_DMABUF_RENDERER=1 for NVIDIA. WebKit
reads that variable first and leaves the transport set empty, which turns
accelerated compositing off, so the Device tab still lagged for NVIDIA
Flatpak users, and the binary could not override it because its setenv is
non-replacing.
The runtime's WebKitGTK is vanilla, so there is no distro isNVIDIA() guard
to clear and WEBKIT_DMABUF_RENDERER_FORCE_SHM=1 alone is the right switch:
compositing stays on and only the hardware DMABUF path is skipped.
* Flatpak: drop the WebKit NVIDIA export; the binary owns the workaround
/proc/driver/nvidia/version is readable inside the Flatpak sandbox, so the
binary's NVIDIA branch already sets WEBKIT_DMABUF_RENDERER_FORCE_SHM with
the correct runtime gate and the entrypoint's own export is redundant.
Verified with:
flatpak run --command=cat com.orcaslicer.OrcaSlicer /proc/driver/nvidia/version
which prints the NVRM version (driver 615.71.09) from inside the sandbox.
* Linux: say what the XWayland compositing gate actually tests
DISPLAY and WAYLAND_DISPLAY are both set in a native Wayland session as
well, because GNOME and KDE run Xwayland as part of the session and export
DISPLAY for it whether or not this process is an X client. The pair means
XWayland is available in the session, not that GTK picked X11 for this
process, so "(an XWayland session)" reads as more than the condition
establishes.
Say what the pair means, and name the case the fallback actually covers:
the X11 backend inside a Wayland session, which is what the forced
GDK_BACKEND=x11 above produces in a build without EGL.
Comment only; behaviour is unchanged.
* Linux: apply the XWayland compositing fallback only where GTK picks X11
The default path set WEBKIT_DISABLE_COMPOSITING_MODE whenever DISPLAY and
WAYLAND_DISPLAY were both set, but a native Wayland app inherits both, so a
build with EGL disabled accelerated compositing — and with it threaded
scrolling — while running on Wayland, where the XWayland bug does not apply.
The only default-path case that really runs through XWayland is the forced
GDK_BACKEND=x11 used when wx lacks EGL, so set the variable there. The
backend cannot be re-checked later: that branch exports GDK_BACKEND itself,
so the force and a user's GDK_BACKEND=x11 opt-in, which deliberately keeps
compositing, would be indistinguishable.
Behaviour is unchanged for WebKitGTK >= 2.42, where the gate already skipped
the variable, and for builds without EGL. A build with EGL on WebKitGTK <
2.42 in a Wayland session no longer loses compositing and threaded scrolling.
The wxWidgets skill reference is updated to match.
---------
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
* Fix unreadable text in wiki and video guide tooltips
* Use a keyboard icon for the gizmo shortcut button
* Fix blank tooltips on the Move and Scale gizmo combo boxes
* Fix external spool gradient and multicolor rendering
* Display AMS gradients and multicolors in color popup
* Preserve AMS gradient selection through color popup
* Match popup selections by full filament color data
* Align AMS Lite gradient geometry with BambuStudio
* Align AMS color palette with BambuStudio presets
* Match Bambu circular color rendering without background masks
* Preserve AMS gradient colors when applying filament settings
* Match AMS preview gradient swatches to the solid color shape
The texture picker's Download from OrcaCloud shortcut asks for a specific page. Re-running the
session handoff to reach it flashed the sign-in interstitial every time; instead an already-open
pane is navigated straight to the page URL, keeping its session. The handoff is still used on the
first open, where a session has to be established.
set_cloud_mode() gains an optional page_url for this. The homepage nav passes none, so its ordinary
re-open keeps the page the pane already holds (guide §8/§10).
* Let Z contouring slice objects that have several instances
The contouring step refused any object with more than one instance. The
instances of a PrintObject differ only by their XY shift, so the mesh is now
placed with the first instance of the PrintObject being contoured.
* Say in the Z contouring comment how instances map to print objects
* Check that Z contouring follows each instance as it is turned
The texture picker lists every plugin pack as an indented, collapsible child of one
"Resource Texture" section, which now always renders so the new button is reachable even
before any pack is installed. A pack whose name carries a " by ..." suffix shows that part
on a smaller, dimmed second line, keeping the name line short.
The button switches to the Home tab and opens the OrcaCloud pane on the plugin hub filtered
to resource textures. A native open now also drives the homepage shell (nav highlight and the
cloud-mode layout), and the requested page is remembered so a sign-in re-seed keeps it.
Also fixes the PluginsDialog fuzzy-search script path, which pointed at a directory the file
is not in.
Space opened the Speed Dial and Ctrl+P the Preferences while the text tool's
box or a sketch value field was being typed into. Those fields are ImGui drawn
on the GL canvas, so the canvas is the focused wx window and focus_keeps_space()
cannot see them; the CHAR_HOOK handler took the chord first and the field never
saw the key.
Skip the global shortcut dispatch while ImGui reports that one of its items owns
the keyboard and the focused window is not a wxControl.
# Description
Adds School House Spools PLA and PETG to the global Orca Filament
Library. Both are standard PLA and PETG, so Bambu PLA Basic / PETG Basic
served as the baseline for tuning values. The one intentional difference
is PETG nozzle temperature (252°C vs Bambu's inherited 255°C default),
based on our own testing.
# Screenshots/Recordings/Graphs
N/A
## Tests
Ran scripts/assign_vendor_setting_ids.py to generate setting_id values,
and scripts/orca_extra_profile_check.py --vendor="OrcaFilamentLibrary"
--check-filaments --check-materials to validate. No new errors or
warnings introduced (pre-existing unrelated errors in other vendors'
profiles were not touched).
[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
* Define validated color picker selection contract
* Integrate web color picker with gradient and alpha controls
Co-authored-by: yw4z <ywsyildiz@gmail.com>
* Apply shared Orca theme to web color picker
* Host color picker in a validated WebView dialog
* Persist color picker favorites in user preferences
* Integrate localized web color picker with filament actions
* Add color picker browser regressions and verify direct includes
* Fit color picker content in a borderless floating panel
* Anchor color picker panels to their triggering controls
* Use accent foreground for selected color picker switches
* Integrate web color picker into generic color fields
* Use web color picker for AMS custom colors
* Use shared web color picker from Linux sidebar menu
* Use web color picker when adding texture import material
* Preserve alpha in filament color picker actions
* Clean up color picker asset whitespace
* Use application translations for color picker validation
* Preserve existing formatting in color picker integration
* Match SpeedDial rounded window handling on macOS
* Align color picker host behavior with SpeedDial
* Consolidate color picker implementation into its dialog
* Remove native color picker fallback
* Limit color picker interfaces to production consumers
* Use shared WebView translation field name
* Reapply anchored color picker placement after GTK show
* update
* fix increment buttons not working on spin inputs
* Use thumb color from its own channel
* init gradients with shifted color for second color
* fix hsl sliders cannot move freely and lock downs other one
* unify save button and color preview & increase stored color count to 32
* switch to hsl based calculation and fix plot and slider drag events
* update
* add support for multi colored gradients
* Update test_filament_color_picker.cpp
* add filtering color palette and store sidebar and combo state
* open dialog with calculated size
* apply shadow to dialog on windows
* add tooltip for gradient add color button
* Restore draggable fixed-size color picker frame
* Fix color picker sidebar sizing in WebKit
* Fix invisible default filament color button on macOS
* Remove duplicated color defs for color picker
* Remove duplicate HTML color picker frame
* Match color picker tests to current theme roles
* update icons
* use focus color on background of filter box
* align gradient switch with hex input
* fix initial window sizing
* Preserve caller color order when drawing filament icons
---------
Co-authored-by: yw4z <ywsyildiz@gmail.com>
The wizard's loading page waits for HandleStudio to be called with
userguide_profile_load_finish and jumps to its target page on it; if the
call never arrives, a fallback timer in the page jumps after 180 s.
GuideFrame started the profile load from the first wxEVT_WEBVIEW_NAVIGATED
event and ran HandleStudio in the page as soon as the data was ready. That
event is the navigation's commit, before the page's scripts have run, and
with the wizard's derived cache the data is ready about 100 ms later.
Since the web view is created with an empty URL so the translated strings
can be injected before the first load, the first navigated event is the
commit of about:blank, so the data is ready before the real page has even
begun loading and the call reaches a page without HandleStudio. WebKit
drops the error and nothing retries, so on macOS the wizard often sits on
"Loading..." for three minutes before the printer list appears.
The loading page now reports in from its OnInit, the way the other wizard
pages request what they need, and the host sends the message once both
the data is ready and the page has reported; every instance of the page
reports again, so one that replaced an earlier one gets its own message.
Fix Move gizmo alignment icon scaling
Apply the native Windows DPI factor when sizing Move gizmo alignment icons.
This matches the sizing path used by other 16 px gizmo controls,
including support paint, seam, fuzzy-skin, and MMU painting tools.
`ninja-build` and `webkit2gtk4-devel` no longer exist on Tumbleweed. Use `ninja`, and use `webkitgtk3-devel` for WebKit. It is the GTK3 build and ships the `webkit2gtk-4.1.pc` that `src/slic3r/CMakeLists.txt` requires.
The `; first_layer_bed_temperature` and `; first_layer_temperature` compatibility lines were always taken from filament 1. Anycubic's GoKlipper reads the bed line to heat the bed, so a plate printed only with another filament got the wrong temperature.
The bed line now follows `bed_temperature_formula` (highest used filament or first printing filament). The nozzle line uses the first printing filament. Both values are computed before the by-object loop.
* Remove unused CMake modules
FindAlienWx.cmake and FindPerlEmbed.cmake came over from the Slic3r Perl
build. Nothing calls find_package(AlienWx) or find_package(PerlEmbed).
LibFindMacros.cmake was only included by those two modules.
bin2h.cmake lost its last caller when the avrdude sources were removed
in e6fcbfae07.
* ci: build changes under cmake/
The Build all path filters did not include cmake/, so a change to a
find module or to ClangClShowIncludes.cmake ran no build on a pull
request or on a push to main.
* fix: pin the Python that builds CPython on Windows
CPython's build needs a Python to run its own build scripts. Without a local
Python 3.10-3.13, find_python.bat installs the newest pythonx86 from nuget.
That became 3.15.0 on 2026-10-09, and 3.15 removed
SourceFileLoader.load_module, which 3.12's makeopcodetargets.py calls:
AttributeError: 'SourceFileLoader' object has no attribute 'load_module'
Download Python 3.13.16 from nuget.org as its own dependency, with a hash
(pythonarm64 on ARM64 hosts, pythonx86 elsewhere), and pass it to PCbuild as
PYTHON, which find_python.bat takes before any other Python. PYTHONHOME and
PYTHONPATH are dropped from that step, since PCbuild runs the scripts
without -E. DEP_PYTHON_HOST points at an existing Python 3.10-3.13 instead,
for machines that cannot reach nuget.org.
Drop 01-windows-nuget.patch. It fixed the dead nuget.exe download link in
find_python.bat, and that fallback is never reached now. Existing deps trees
keep working: with no patch command, ExternalProject skips the patch step
instead of re-applying the patch to patched sources.
* fetch externals separately
---------
Co-authored-by: yw4z <ywsyildiz@gmail.com>
* Option: Show/ Hide inactive plates
* Hide inactive plate volumes by bounds
Switch inactive-plate volume hiding to use geometric overlap with the current plate bounding box instead of object and wipe tower ID mapping. This also guards against a missing current plate and keeps any active volume visible when its transformed bounds overlap the current plate footprint.
* Hide inactive plates per instance and keep them unpickable
Decide what is shown per object instance, from its footprint over the
current plate, so the parts of an object are never split; a selected
instance stays visible.
Keep the hidden state between frames instead of restoring it after each
one. GLVolume::on_hidden_plate records what this update hid, so it only
shows that again and leaves the volumes gizmos hide alone, and the raycasts
made while handling the mouse see the same scene as the frame. Nothing runs
while the inactive plates are shown.
Deactivate the raycasters of the other plates, whose icons still took
clicks where nothing was drawn, move the axes to the current plate, and
limit the option to Prepare, as Preview already shows the current plate
alone.
* Follow the selected plate with the camera while the others are hidden
Selecting a plate in Prepare while the inactive plates are hidden moves
the camera target over it and keeps the angle, distance and height, so
the plate comes into view where the previous one was. A zoom to all
plates, as after loading a project or adding a plate, frames the current
plate instead.
* Add a compact plate switcher while inactive plates are hidden
The hidden plates can no longer be clicked, and the object list gets
crowded on large projects. While they are hidden in Prepare, a column of
numbered buttons in the top left corner, a compact counterpart of the
Preview plate toolbar, selects the plate to show. It highlights the
current plate, dims the empty ones and gives the plate name in the
tooltip.
* Simplify the inactive plates update and the plate switcher layout
Decide and apply each volume's state in one pass instead of filling a
per-volume vector first, and hoist the switcher's loop-invariant colors.
Keep the height the bottom-left corner takes next to the constants it is
made of, with the canvas toolbar's button spacing named, rather than
repeating that layout in the switcher.
* Rename the option to Focus mode
The canvas menu entry reads Focus mode, lit while the other plates are
hidden, and is off by default, so nothing changes until it is turned on.
The app config key is focus_mode. Turning it on zooms to the current
plate, so the plate fills the view.
* Show plate thumbnails in the plate switcher
The switcher shows the thumbnails of the Preview plate toolbar instead of
numbered buttons, with rounded corners concentric with the window's.
Plater::plate_toolbar_image_version() lets it refresh them without
clearing the Preview toolbar's dirty flag.
* Don't draw the sinking contours of inactive volumes
GLVolume::render() skips an inactive volume, but its sinking contour was
still drawn, so an object on a hidden plate left its outline behind.
* Show the plate switcher's scrollbar only on hover, as in Preview
The plate switcher now shares the Preview plate toolbar's scrollbar: the
same width and colors, shown only while the mouse is over the column or
drags the bar, with the mouse wheel scrolling it either way, and tighter
window corners while it shows. Both toolbars draw it through the same
helpers, so they cannot drift apart; the Preview toolbar behaves as before.
Drop the frame style the switcher no longer uses since it draws
thumbnails instead of buttons.
* Make the plate switcher's thumbnails cheaper and match the Preview toolbar
The thumbnail version moves after almost every edit, and the switcher
redrew both thumbnails of every plate each time. It now redraws only the
current plate's, the only one edited while the others are hidden, and the
other plates' once their thumbnails are invalidated, through the new
Plater::update_plate_thumbnails().
IMToolbarItem::set_thumbnail() uploads a plate thumbnail without keeping
a copy of its pixels, a megabyte per plate, and replaces the item setup
the Preview toolbar and the switcher each repeated. The switcher's hover
border takes the Preview toolbar's color.
---------
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
* Export G-code statistics as JSON
Add an export of a plate's G-code statistics for scripts and
spreadsheets that compare prints or settings: print time, travel,
filament and feature totals, the same per layer, and the filament of
each object instance and its supports. The times are the preview's
estimates, summed the way the preview sums them.
The GUI writes <name>.statistics.json next to an exported G-code when
"Export statistics with G-code" is enabled in Preferences (Control >
Slicing). The CLI writes plate_N.statistics.json to the output directory
with --export-statistics, and exits with -25 when it cannot.
The per-instance masses now carry the object's name and the instance's
index, so the export can name them. The vertices the processor adds
inside a move for the actual speed view repeat the move's extrusion, so
the filament sums skip them.
* Move the statistics export preference to the Developer tab
"Export statistics with G-code" now sits in Developer > Settings
instead of Control > Slicing.
* Store the G-code statistics inside exported 3MF files
With the preference on, an exported sliced 3MF file holds each plate's
statistics as Metadata/plate_N.statistics.json, next to its G-code. The
print job sent to a printer and the autosave backup leave them out.
The CLI does the same with --export-3mf, and writes the separate file
only next to the G-code in --outputdir, as without it the G-code is a
temporary file. The file is written in binary mode, so it reads the
same on every platform and matches the copy in the 3MF.
* Address review of the statistics export
- Number each object instance by its position among its model object's
copies. A copy of another rotation or scale, and every copy on a belt
printer, slices as a print object of its own, where it was always
instance 0; a copy after a non-printable one shifted too.
- Take the filament totals from the processor's statistics, which count
the flush as the preview's filament table does, and list each
filament's model, support, prime tower and flush use. The summary's
cost is now filament_cost, as the preview's cost adds the time cost.
- State when the version goes up.
- Drop the preference's default, which get_bool already gives.
Object and copy ids were only assigned in set_object_info(), which runs only for Klipper, Marlin and RRF with Exclude objects on. Every other printer, Bambu included, printed an uninitialized object id and labeled every copy as copy 0. The numbering now runs on every export, so the labels are stable and unique on all printers. Output for Klipper, Marlin and RRF with Exclude objects on is unchanged.
The label test covers Marlin, Klipper and Repetier, plus a BBL row that checks each copy gets its own M624/M625 skip block.
Co-authored-by: raistlin7447 <kris.austin@gmail.com>
When a CLI export rendered the no-light thumbnail but no plate thumbnail, the no-light loop set the plate thumbnail's status flag. That skipped the fallback that copies the plate thumbnail from disk, so re-exporting a 3mf that has plate_N.png but no plate_no_light_N.png left plate_N.png out of the package. The loop now sets no_light_thumbnail_status instead.
# Description
Follow-up to #13373, which added Align/Distribute to the object context
menu. This fixes the problems found in its review and brings
BambuStudio's align and distribute controls to the Move gizmo.
Align and distribute now work when all copies of an object are selected,
on parts of rotated, scaled or mirrored objects, and on objects with
several copies, whose other copies used to lose the part move. Aligning
a single object arranges its solid parts and leaves modifiers and
negative volumes in place. Moves in Z are offered only when Auto-Drop
would not undo them. Commands that would do nothing are disabled, each
operation is a single undo step, and other plates keep their slicing
result. The same fix stops the automatic drop to the bed after a move,
rotate, scale or mirror from also moving copies of other selected
objects.
The Move gizmo gets BambuStudio's align row. It aligns or distributes
the selected objects or parts, or aligns them to their object or to the
plate, and previews the target while you hover an icon. While the Move
gizmo is open, Ctrl+click adds objects to the selection, and Alt+click
adds or removes parts of the selected object.
No change to slicing output or project files.
# Screenshots/Recordings/Graphs
https://github.com/user-attachments/assets/44c308c3-faff-4f51-a3b7-88f264f03743
## Tests
<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->
<!--
> 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)
Print::apply() decided the shrinkage compensation from the existing PrintObjects and their regions. On the first apply() they do not exist yet, so the first slice was not scaled. The CLI calls apply() only once, so filament_shrink and filament_shrinkage_compensation_z had no effect there.
The compensation is now decided before the PrintObjects are built, from the filaments the model uses, and stored in Print. When the filaments have different shrinkage values, every filament assigned to a feature, height range, modifier, support, tool change or the wipe tower counts, even if it does not end up printing. If they disagree, compensation stays off with the existing warning.
Supports, seam, fuzzy skin and texture displacement loaded paint data with the default max_ebt, so a 3mf with a paint state above what the gizmo paints read past the 3-entry color table. Each gizmo now passes its highest paint state as max_ebt, as the MMU gizmo already does, and higher states load as unpainted.
has_restore_data() signals "this backup is in use, leave it alone" by setting
origin to "<lock>". Its caller treats anything else as permission to delete
(Plater.cpp, the EVT_RESTORE_PROJECT handler):
try {
if (originfile != "<lock>") // see bbs_3mf.cpp for lock detail
boost::filesystem::remove_all(last);
}
catch (...) {}
So every "return false" that leaves origin empty is a delete instruction, and
three of them fired without anyone having established that the backup was
spent.
lock.txt exists but cannot be read. load_string_file() was outside the try, so
the exception left has_restore_data() altogether. The handler is queued and has
no try around the call, so this took the application down. Fixes#15670.
lock.txt reads but holds no pid. A crash or a full disk mid-write leaves a
zero-length lock.txt, because save_string_file() truncates before it writes.
boost::lexical_cast<int>("") throws into the catch, which returned false with
origin still empty, and the caller deleted the backup. Also #15670.
The .3mf probe could not answer. A path that cannot be probed at all reports
false exactly like a missing one, so an unreachable backup looked spent. The
error_code now separates the two: ENOENT and ENOTDIR mean "not there" and stay
collectable, any other error means the question was never answered.
All three now claim the lock. Declining a restore is recoverable; deleting a
backup nobody could examine is not.
What deliberately did not change: a readable directory with no lock and no
project still comes back with origin empty and stays collectable, as do a lock
held by another process and a directory that does not exist. Claiming the lock
whenever anything looked amiss would strand every spent backup on disk, so
those three cases are tests rather than prose.
Tested in tests/libslic3r/test_3mf.cpp. Against the previous behaviour the new
cases fail as they should -- the two uninterpretable locks come back with an
empty origin, and the unreadable one escapes as
basic_ios::clear: iostream error
while the three collectable cases pass unchanged, before and after.
Regenerate the template after rebasing onto main, which brought the 14
strings of the object Align/Distribute menu (#13373), and translate
them in all 22 catalogs. Each language reuses its catalog's existing
"align" wording, with one consistent pattern for the edge, center and
distribute items. Entries whose wording needs a native speaker's check
carry review notes.
Labels that were wrong or contradicted the glossary:
- Bridge flow ratio and internal bridge flow ratio use the glossary's
Flow ratio term (ca, de, fr, ja, nl, ru, sv, zh_CN, zh_TW), with the
tooltips that quote them.
- tr Line width was "layer width"; tr Modifier was the verb "change";
hu Rectangle was "square"; pl No sparse layers meant "layers without
purging"; uk Auto backup was slang.
- Wall order labels made consistent (de, fr, it); th Migrate User
Presets uses the glossary's preset term; lt keeps Pressure Advance in
English per the glossary and translates Adaptive.
- Role based wipe speed now says it follows the extrusion role (de, ru,
pl, tr, zh_CN, zh_TW).
- ru Line infill pattern is "Линия", matching the glossary.
Translations that only covered part of the source or had typos: de
external bridge flow tooltip, zh_TW role-based wipe tooltip, ru wall
type tooltip option names, fr apostrophes, uk final period. es entries
from the last pass now use usted, the catalog's register.
Terms aligned with the glossary: purge/flush, prime tower, wipe and
flushing volume (ko), flow ratio (ca, ja), layer, shell, travel, walls,
plates, raft and fuzzy skin (th), wipe (eu), bridge (de).
Machine-translated entries that use the unsettled Prime tower / Wipe
tower and Tool (printer) terms carry review notes (cs, fr, ja, nl, tr,
uk).
The design said every pattern other than the trapezoidal and adaptive
ones outlines its centerlines with multiline_fill(). 3D Honeycomb skips
it and draws its own parallel copies of each wave, which never cross.