Skip to content

[Feature]: per-Virtual-Printer 'Save AMS mapping' toggle + reprint auto-apply from saved mapping #2684

Description

@Striker72rus

Problem or Use Case

When a print is queued through a Virtual Printer from a slicer (e.g. OrcaSlicer/Bambu Studio), the slicer's AMS/tray-to-filament mapping is currently not preserved anywhere. When the resulting archive entry is later reprinted, the user has to manually re-map every filament slot again, even though the original slicer mapping is still known at print time and is very likely still correct (same physical spools/AMS layout). This gets repetitive for anyone who reprints the same models regularly.

Proposed Solution

  • Add a new per-Virtual-Printer setting, save_ams_mapping (bool, default off), configurable from the Virtual Printer card in the frontend.
  • When enabled, persist the slicer's AMS mapping (slicer_ams_mapping, array indexed by slicer tool index) into archive.extra_data at the time the print is added to the queue / restamped.
  • The mapping is written only while the toggle is on, but is read unconditionally on reprint — turning the toggle off later does not erase previously saved mappings, it only stops recording new ones.
  • On the reprint / queue-edit filament-mapping screen, show a "Mapping" toggle button whenever a saved mapping exists for the archive. Clicking it snaps every filament-slot assignment straight to the saved mapping (matched by the slicer's tool index against the target printer's AMS layout), instead of the existing color/material best-effort auto-match. Clicking again reverts to the auto-match result.
  • Show an "AMS mapping saved" badge on archive entries that have a stored mapping, so it's visible before opening the reprint dialog.

Scope:
Backend — backend/app/models/virtual_printer.py (new column + migration), backend/app/api/routes/virtual_printers.py, backend/app/services/virtual_printer/manager.py (_add_to_print_queue / _restamp_recent_queue_item), backend/app/services/archive.py.
Frontend — frontend/src/components/VirtualPrinterCard.tsx, frontend/src/components/PrintModal/FilamentMapping.tsx (+ types.ts, index.tsx), frontend/src/pages/ArchivesPage.tsx.

Alternatives Considered

A global "require exact filament match" setting was prototyped first but reverted — it changed scheduler/queue matching semantics broadly instead of solving the actual pain point (repetitive manual remapping on reprint), and was a bigger behavior change than needed.

Feature Category

Print Queue & Scheduling

Priority

Would improve my workflow

Mockups or Examples

No mockups — the affected UI is the existing filament-mapping screen in the reprint/queue-edit dialogs; the change adds a small toggle button next to the existing filament rows.

Image Image

Contribution

  • I would be willing to help implement this feature

Checklist

  • I have searched existing issues to ensure this feature hasn't already been requested

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions