mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
FIX: fix the default materials loading failed issue
Change-Id: I9341e6ec209673585a9ed3a981db92d28ac30659
This commit is contained in:
@@ -1197,7 +1197,12 @@ void PresetBundle::load_installed_filaments(AppConfig &config)
|
|||||||
if (!add_default_materials)
|
if (!add_default_materials)
|
||||||
continue;
|
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);
|
Preset* filament = filaments.find_preset(default_filament, false, true);
|
||||||
if (filament && filament->is_system)
|
if (filament && filament->is_system)
|
||||||
|
|||||||
Reference in New Issue
Block a user