mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-06 14:57:50 -07:00
ENH: add layer num in filament end GCode
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I6f81b86a7b7391048d70f2c4839733a69015e53b (cherry picked from commit aafcfd72f40dd221286b757da9d494498d36374c)
This commit is contained in:
parent
cd16bd83a3
commit
a0f38f3cfd
1 changed files with 3 additions and 1 deletions
|
|
@ -698,7 +698,9 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
|||
unsigned int old_filament_id = gcodegen.writer().filament()->id();
|
||||
const std::string& filament_end_gcode = gcodegen.config().filament_end_gcode.get_at(old_filament_id);
|
||||
if (gcodegen.writer().filament() != nullptr && !filament_end_gcode.empty()) {
|
||||
end_filament_gcode_str = gcodegen.placeholder_parser_process("filament_end_gcode", filament_end_gcode, old_filament_id);
|
||||
DynamicConfig config;
|
||||
config.set_key_value("layer_num", new ConfigOptionInt(gcodegen.m_layer_index));
|
||||
end_filament_gcode_str = gcodegen.placeholder_parser_process("filament_end_gcode", filament_end_gcode, old_filament_id, &config);
|
||||
check_add_eol(end_filament_gcode_str);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue