Merge upstream main: Python plugins, Bambu device rework, macOS fixes

Resolved 4 conflicts:
- PrintConfig.hpp / Preset.cpp: upstream restored calib_flowrate_topinfill_special_order
  (removed in the prior merge, now re-added and re-registered); kept it alongside our
  IMEX options (imex_parallel_mode, imex_head_filament_map).
- Plater.cpp: kept our <sstream> include plus upstream's <optional> and plugin includes.
- tests/fff_print/test_gcodewriter.cpp: both sides appended disjoint scenarios after a
  shared base. Reconstructed as upstream's full file (base + its 3 toolchange/H2C
  scenarios + the boost/filesystem include its helper needs) followed by our 10
  set_pressure_advance / set_temperature scenarios. 22 scenarios total, no duplicates.
This commit is contained in:
Clifford Garwood committed 2026-07-19 18:33:58 -04:00
commit 58b4a68a10
730 files changed
+2322299 -1241524

No files matched your search

+46 -3
View File
@@ -470,6 +470,8 @@ void Preset::normalize(DynamicPrintConfig &config)
continue;
if (filament_options_with_variant.find(key) != filament_options_with_variant.end())
continue;
if (filament_dev_options.find(key) != filament_dev_options.end())
continue;
auto *opt = config.option(key, false);
/*assert(opt != nullptr);
assert(opt->is_vector());*/
@@ -1205,6 +1207,9 @@ static std::vector<std::string> s_Preset_print_options{
"min_feature_size",
"min_bead_width",
"post_process",
"slicing_pipeline_plugin",
"plugins",
"plugin_config_overrides",
"process_change_extrusion_role_gcode",
"min_length_factor",
"wall_maximum_resolution",
@@ -1314,6 +1319,7 @@ static std::vector<std::string> s_Preset_print_options{
"interlocking_depth",
"interlocking_boundary_avoidance",
"interlocking_beam_width",
"calib_flowrate_topinfill_special_order",
// IDEX/IQEX parallel print mode (per-print selection)
"imex_parallel_mode",
"imex_head_filament_map",
@@ -1380,7 +1386,12 @@ static std::vector<std::string> s_Preset_filament_options {/*"filament_colour",
"filament_pre_cooling_temperature", "filament_pre_cooling_temperature_nc",
"filament_preheat_temperature_delta", "filament_retract_length_nc",
"filament_change_length_nc", "filament_prime_volume_nc",
"long_retractions_when_ec", "retraction_distances_when_ec"
"long_retractions_when_ec", "retraction_distances_when_ec",
"plugin_config_overrides",
//ams chamber
"filament_dev_ams_drying_ams_limitations", "filament_dev_ams_drying_temperature", "filament_dev_ams_drying_time", "filament_dev_ams_drying_heat_distortion_temperature",
"filament_dev_chamber_drying_bed_temperature", "filament_dev_chamber_drying_time",
"filament_dev_drying_softening_temperature", "filament_dev_drying_cooling_temperature"
};
static std::vector<std::string> s_Preset_machine_limits_options {
@@ -1432,7 +1443,8 @@ static std::vector<std::string> s_Preset_printer_options {
"machine_hotend_change_time", "machine_prepare_compensation_time",
// Fast-purge printer flag + device/firmware-facing per-variant extruder-change
// deretraction speed (unconsumed by the slicer; carried by H2D/A2L/X2D/P2S machine profiles).
"support_fast_purge_mode", "deretract_speed_extruder_change"
"support_fast_purge_mode", "deretract_speed_extruder_change",
"plugin_config_overrides"
};
static std::vector<std::string> s_Preset_sla_print_options {
@@ -3466,7 +3478,18 @@ void add_correct_opts_to_diff(const std::string &opt_key, t_config_option_keys&
for (int i = 0; i < int(opt_cur->values.size()); i++)
{
int init_id = i <= opt_init_max_id ? i : 0;
const bool is_new_index = i > opt_init_max_id;
int init_id = is_new_index ? 0 : i;
if (is_new_index) {
// Orca: intentional divergence from upstream. Any new vector index (at or
// beyond the reference vector's length) is flagged dirty unconditionally --
// independent of its value and nil-state -- so preset dirty-detection notices
// per-extruder/filament entries added by growth (e.g. extruder count). This
// applies to every vector option type routed through deep_diff().
// Covered by tests/libslic3r/test_preset_diff.cpp.
vec.emplace_back(opt_key + "#" + std::to_string(i));
continue;
}
if (opt_cur->values[i] != opt_init->values[init_id]) {
if (opt_cur->nullable()) {
if (opt_cur->is_nil(i)) {
@@ -3832,6 +3855,26 @@ void PresetCollection::set_custom_preset_alias(Preset &preset)
set_printer_hold_alias(preset.alias, preset);
}
std::string PresetCollection::get_preset_alias(Preset &preset, bool force)
{
if (!preset.alias.empty())
return preset.alias;
else
set_custom_preset_alias(preset);
if (!preset.alias.empty() || !force)
return preset.alias;
std::string alias_name;
std::string preset_name = preset.name;
size_t end_pos = preset_name.find_first_of("@");
if (end_pos != std::string::npos) {
alias_name = preset_name.substr(0, end_pos);
boost::trim_right(alias_name);
}
return alias_name;
}
void PresetCollection::set_printer_hold_alias(const std::string &alias, Preset &preset, bool remove)
{
auto compatible_printers = dynamic_cast<ConfigOptionStrings *>(preset.config.option("compatible_printers"));