Fix initial filament loading for non-bbl printers (SoftFever/OrcaSlicer#11218)

This commit is contained in:
Noisyfox
2025-11-03 23:43:23 +08:00
parent 763bdb5dee
commit 664a34f129

View File

@@ -2874,6 +2874,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
m_writer.set_current_position_clear(false); m_writer.set_current_position_clear(false);
m_start_gcode_filament = GCodeProcessor::get_gcode_last_filament(machine_start_gcode); m_start_gcode_filament = GCodeProcessor::get_gcode_last_filament(machine_start_gcode);
if (is_bbl_printers) {
m_writer.init_extruder(initial_non_support_extruder_id); m_writer.init_extruder(initial_non_support_extruder_id);
// add the missing filament start gcode in machine start gcode // add the missing filament start gcode in machine start gcode
{ {
@@ -2885,6 +2886,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
// mark the first filament used in print // mark the first filament used in print
file.write_format(";VT%d\n", initial_extruder_id); file.write_format(";VT%d\n", initial_extruder_id);
} }
}
//flush FanMover buffer to avoid modifying the start gcode if it's manual. //flush FanMover buffer to avoid modifying the start gcode if it's manual.
if (!machine_start_gcode.empty() && this->m_fan_mover.get() != nullptr) if (!machine_start_gcode.empty() && this->m_fan_mover.get() != nullptr)