From 1aee0cf5263328ba18ca07015cbeea92d1a7ff98 Mon Sep 17 00:00:00 2001
From: Argo <52103738+Argolein@users.noreply.github.com>
Date: Thu, 5 Feb 2026 11:18:59 +0100
Subject: [PATCH] AMS Filament sync fix for locked Tool 1 & 2 (#12180)
Toolchanger printers with 4 tools were incorrectly treated as dual-nozzle (IDEX-style) printers in AMS Sync. So I was locked to just tool 1/2.
Adjusted AMS Sync to use dual-nozzle logic only for true 2-nozzle setups (nozzle_nums == 2 and filament_map in {1,2}), and route 3+ tool toolchangers through the generic mapping flow so all tool IDs are handled correctly.
Before:
After:
Tested on / with:
- Snamaker U1
- ARM macOS
---
src/slic3r/GUI/SyncAmsInfoDialog.cpp | 31 +++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/src/slic3r/GUI/SyncAmsInfoDialog.cpp b/src/slic3r/GUI/SyncAmsInfoDialog.cpp
index b9a9135502..49f75d23d1 100644
--- a/src/slic3r/GUI/SyncAmsInfoDialog.cpp
+++ b/src/slic3r/GUI/SyncAmsInfoDialog.cpp
@@ -222,8 +222,27 @@ bool SyncAmsInfoDialog::get_is_double_extruder()
{
const auto &full_config = wxGetApp().preset_bundle->full_config();
size_t nozzle_nums = full_config.option("nozzle_diameter")->values.size();
- bool use_double_extruder = nozzle_nums > 1 ? true : false;
- return use_double_extruder;
+ // This dialog has dedicated left/right layout logic only for true 2-nozzle printers.
+ // For toolchangers with 3+ tools (or any filament_map beyond {1,2}),
+ // fall back to the generic list flow so all tools are shown.
+ if (nozzle_nums != 2)
+ return false;
+
+ auto *plater = wxGetApp().plater();
+ if (!plater)
+ return true;
+ auto *plate = plater->get_partplate_list().get_curr_plate();
+ if (!plate)
+ return true;
+
+ const auto &project_config = wxGetApp().preset_bundle->project_config;
+ auto filament_maps = plate->get_real_filament_maps(project_config);
+ for (int map_id : filament_maps) {
+ if (map_id != 1 && map_id != 2) {
+ return false;
+ }
+ }
+ return true;
}
bool SyncAmsInfoDialog::is_dirty_filament() {
@@ -2386,7 +2405,7 @@ void SyncAmsInfoDialog::update_show_status()
size_t nozzle_nums = full_config.option("nozzle_diameter")->values.size();
// the nozzle type of preset and machine are different
- if (nozzle_nums > 1) {
+ if (get_is_double_extruder()) {
wxString error_message;
if (!is_nozzle_type_match(*obj_->GetExtderSystem(), error_message)) {
std::vector params{error_message};
@@ -2721,9 +2740,7 @@ void SyncAmsInfoDialog::reset_and_sync_ams_list()
DeviceManager *dev_manager = Slic3r::GUI::wxGetApp().getDeviceManager();
if (!dev_manager) return;
MachineObject *obj_ = dev_manager->get_selected_machine();
- const auto & full_config = wxGetApp().preset_bundle->full_config();
- size_t nozzle_nums = full_config.option("nozzle_diameter")->values.size();
- if (nozzle_nums > 1) {
+ if (get_is_double_extruder()) {
m_mapping_popup.set_show_type(ShowType::LEFT_AND_RIGHT);//special
}
// m_mapping_popup.set_show_type(ShowType::RIGHT);
@@ -3350,4 +3367,4 @@ bool FinishSyncAmsDialog::Layout()
return true;
}
-}} // namespace Slic3r
\ No newline at end of file
+}} // namespace Slic3r