mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 11:52:05 +00:00
Automatically select external spool if it's the only installed filament (#13356)
* Clean up code * Filament mapping select ext slot automatically when no AMS filament inserted (OrcaSlicer/OrcaSlicer#13103) * Show warning if external filament type does not match the one in sliced file
This commit is contained in:
@@ -354,6 +354,27 @@ namespace Slic3r
|
||||
}
|
||||
}
|
||||
|
||||
// Orca: special cases that no AMS available, we select ext slot automatically because we don't have other choice anyway
|
||||
if (tray_filaments.size() == 1 && devPrinterUtil::IsVirtualSlot(tray_filaments.begin()->first)) {
|
||||
auto ext_tray = tray_filaments.begin();
|
||||
for (auto & r : result) {
|
||||
if (r.tray_id < 0) {
|
||||
r.tray_id = ext_tray->first;
|
||||
|
||||
r.color = ext_tray->second.color;
|
||||
r.type = ext_tray->second.type;
|
||||
r.distance = ext_tray->second.distance;
|
||||
r.filament_id = ext_tray->second.filament_id;
|
||||
r.ctype = ext_tray->second.ctype;
|
||||
r.colors = ext_tray->second.colors;
|
||||
|
||||
/*for new ams mapping*/
|
||||
r.ams_id = ext_tray->second.ams_id;
|
||||
r.slot_id = ext_tray->second.slot_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//check ams mapping result
|
||||
if (DevMappingUtil::is_valid_mapping_result(obj, result, true))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user