mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: support recommended filament map when print by object
1. support recommended filament map when print by object 2. placeholder_parser support function filament_change 3. extruder_id of filament_map is start from 1 Change-Id: Ide8019cd4a165a25972f22706ff685c3005aa031 (cherry picked from commit b42d94e1d05236b8b7b2e65b4a24810eecf040cb)
This commit is contained in:
@@ -2746,12 +2746,8 @@ void GCode::check_placeholder_parser_failed()
|
||||
size_t GCode::get_extruder_id(unsigned int filament_id) const
|
||||
{
|
||||
if (m_print) {
|
||||
std::vector<int> filament_maps = m_print->get_filament_maps();
|
||||
if (filament_id < filament_maps.size()) {
|
||||
return filament_maps[filament_id];
|
||||
}
|
||||
return m_print->get_extruder_id(filament_id);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user