BBL Port Color Mix Base

This commit is contained in:
Ian Bassi
2026-08-23 22:11:48 +08:00
committed by SoftFever
parent 550e234a37
commit 8fea099d99
75 changed files with 34174 additions and 51 deletions
+16
View File
@@ -4,6 +4,7 @@
#include "PresetHints.hpp"
#include "libslic3r/PresetBundle.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/FilamentMixer.hpp"
#include "libslic3r/Utils.hpp"
#include "libslic3r/Model.hpp"
#include "libslic3r/GCode/GCodeProcessor.hpp"
@@ -3497,6 +3498,21 @@ void TabPrintModel::activate_selected_page(std::function<void()> throw_if_cancel
f->set_value(boost::any(), false);
}
}
if (m_type == Preset::TYPE_PLATE)
static_cast<TabPrintPlate *>(this)->update_mixed_filament_seq_state();
}
// A mixed-color slot resolves to a different physical filament per layer, so a
// user-defined filament print order cannot be honoured while one exists.
void TabPrintPlate::update_mixed_filament_seq_state()
{
if (!m_active_page) return;
auto &proj_cfg = m_preset_bundle->project_config;
auto *opt = proj_cfg.option<ConfigOptionBools>("filament_is_mixed");
bool has_mixed = opt && has_any_mixed_filament(opt->values);
toggle_option("first_layer_sequence_choice", !has_mixed);
toggle_option("other_layers_sequence_choice", !has_mixed);
}
void TabPrintModel::on_value_change(const std::string& opt_id, const boost::any& value)