diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index cc606d216f..ffb796a705 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -307,10 +307,15 @@ class MaterialManager(QObject): # For materials such as ultimaker_pla_orange, no quality profiles may be found, so we should fall back to use # the generic material IDs to search for qualities. # + # An example would be, suppose we have machine with preferred material set to "filo3d_pla" (1.75mm), but its + # extruders only use 2.85mm materials, then we won't be able to find the preferred material for this machine. + # A fallback would be to fetch a generic material of the same type "PLA" as "filo3d_pla", and in this case it will + # be "generic_pla". This function is intended to get a generic fallback material for the given material type. + # # This function returns the generic root material ID for the given material type, where material types are "PLA", # "ABS", etc. # - def getFallbackMaterialId(self, material_type: str) -> str: + def getFallbackMaterialIdByMaterialType(self, material_type: str) -> str: # For safety if material_type not in self._fallback_materials_map: Logger.log("w", "The material type [%s] does not have a fallback material" % material_type) diff --git a/cura/Machines/QualityManager.py b/cura/Machines/QualityManager.py index 68a6a344ba..90ba7d8da3 100644 --- a/cura/Machines/QualityManager.py +++ b/cura/Machines/QualityManager.py @@ -376,7 +376,7 @@ class QualityManager(QObject): # Also try to get the fallback material material_type = extruder.material.getMetaDataEntry("material") - fallback_root_material_id = self._material_manager.getFallbackMaterialId(material_type) + fallback_root_material_id = self._material_manager.getFallbackMaterialIdByMaterialType(material_type) if fallback_root_material_id: root_material_id_list.append(fallback_root_material_id)