mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
GCodeViewer -> Show printbed model and texture for system printers detected when loading gcode files produced by PrusaSlicer
This commit is contained in:
parent
992d7065b2
commit
7a093b08fd
6 changed files with 51 additions and 2 deletions
|
@ -1812,6 +1812,26 @@ namespace PresetUtils {
|
|||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
std::string system_printer_bed_model(const Preset& preset)
|
||||
{
|
||||
std::string out;
|
||||
const VendorProfile::PrinterModel* pm = PresetUtils::system_printer_model(preset);
|
||||
if (pm != nullptr && !pm->bed_model.empty())
|
||||
out = Slic3r::resources_dir() + "/profiles/" + preset.vendor->id + "/" + pm->bed_model;
|
||||
return out;
|
||||
}
|
||||
|
||||
std::string system_printer_bed_texture(const Preset& preset)
|
||||
{
|
||||
std::string out;
|
||||
const VendorProfile::PrinterModel* pm = PresetUtils::system_printer_model(preset);
|
||||
if (pm != nullptr && !pm->bed_texture.empty())
|
||||
out = Slic3r::resources_dir() + "/profiles/" + preset.vendor->id + "/" + pm->bed_texture;
|
||||
return out;
|
||||
}
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
} // namespace PresetUtils
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue