mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
FIX: fix the default materials loading failed issue
Change-Id: I9341e6ec209673585a9ed3a981db92d28ac30659
This commit is contained in:
parent
03226c9e43
commit
b65d47b544
1 changed files with 7 additions and 2 deletions
|
@ -1197,7 +1197,12 @@ void PresetBundle::load_installed_filaments(AppConfig &config)
|
|||
if (!add_default_materials)
|
||||
continue;
|
||||
|
||||
for (auto default_filament: printer.vendor->models[0].default_materials)
|
||||
const VendorProfile::PrinterModel *printer_model = PresetUtils::system_printer_model(printer);
|
||||
if (!printer_model) {
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": can not find printer_model for printer %1%")%printer.name;
|
||||
continue;
|
||||
}
|
||||
for (auto default_filament: printer_model->default_materials)
|
||||
{
|
||||
Preset* filament = filaments.find_preset(default_filament, false, true);
|
||||
if (filament && filament->is_system)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue