mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-21 16:02:37 +00:00
Merge branch 'main' into feat/printer-agent-impl
This commit is contained in:
@@ -521,10 +521,10 @@ static const FileWildcards file_wildcards_by_type[FT_SIZE] = {
|
||||
/* FT_GCODE */ { L("G-code files"), { ".gcode"sv} },
|
||||
#ifdef __APPLE__
|
||||
/* FT_MODEL */
|
||||
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".usd"sv, ".usda"sv, ".usdc"sv, ".usdz"sv, ".abc"sv, ".ply"sv, ".drc"sv}},
|
||||
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".gltf"sv, ".glb"sv, ".fbx"sv, ".usd"sv, ".usda"sv, ".usdc"sv, ".usdz"sv, ".abc"sv, ".ply"sv, ".drc"sv}},
|
||||
#else
|
||||
/* FT_MODEL */
|
||||
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".drc"sv}},
|
||||
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".gltf"sv, ".glb"sv, ".fbx"sv, ".drc"sv}},
|
||||
#endif
|
||||
/* FT_ZIP */ { L("ZIP files"), { ".zip"sv } },
|
||||
/* FT_PROJECT */ { L("Project files"), { ".3mf"sv} },
|
||||
@@ -8903,7 +8903,17 @@ void GUI_App::load_current_presets(bool active_preset_combox/*= false*/, bool ch
|
||||
if (printer_technology == ptFFF && !edited_printer_preset.config.opt_bool("single_extruder_multi_material")) {
|
||||
auto* nozzle_diameter = edited_printer_preset.config.option<ConfigOptionFloats>("nozzle_diameter");
|
||||
if (nozzle_diameter) {
|
||||
preset_bundle->set_num_filaments(nozzle_diameter->values.size());
|
||||
// Mixed-color slots are virtual filaments kept at the tail of the list, so they have no
|
||||
// nozzle of their own and the count has to allow for them. Only ever grow: this sizes
|
||||
// the list so the combo boxes have something to bind to, and set_num_filaments() trims
|
||||
// at the raw tail, so shrinking here would eat the mixes rather than the surplus
|
||||
// physical slots. A list longer than the nozzle count is a state the app reaches
|
||||
// legitimately - raising the extruder count and not saving the printer preset leaves
|
||||
// exactly that on the next start - and losing the project's mixes to it is worse than
|
||||
// carrying a filament the printer has no nozzle for until the count is next changed.
|
||||
const size_t target = nozzle_diameter->values.size() + preset_bundle->num_mixed_filaments();
|
||||
if (target > preset_bundle->filament_presets.size())
|
||||
preset_bundle->set_num_filaments(target);
|
||||
}
|
||||
}
|
||||
this->plater()->set_printer_technology(printer_technology);
|
||||
|
||||
Reference in New Issue
Block a user