mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Check for Ultimaker printers based on manufacturer
CURA-5149
This commit is contained in:
parent
5b371ac375
commit
5b36b4fb84
1 changed files with 5 additions and 7 deletions
|
@ -40,14 +40,12 @@ class GenericMaterialsModel(BaseMaterialsModel):
|
|||
self.setItems([])
|
||||
return
|
||||
|
||||
#special case only for Ultimaker printers, filter the generic list
|
||||
printer_name = global_stack.getMetaDataEntry("name", "empty")
|
||||
filter_ultimaker_printers = False
|
||||
if printer_name and printer_name[:9] == "Ultimaker":
|
||||
filter_ultimaker_printers = True
|
||||
# Check if it's an Ultimaker printer
|
||||
printer_manufacturer = global_stack.getMetaDataEntry("manufacturer", "")
|
||||
is_ultimaker_printer = "ultimaker" in printer_manufacturer.lower()
|
||||
|
||||
# Special case, Ultimaker generic list also should be filtered
|
||||
if filter_ultimaker_printers is False:
|
||||
# For Ultimaker printers, only show the generic materials that are supported.
|
||||
if not is_ultimaker_printer:
|
||||
item_list = self._getGenericProfiles(available_material_dict)
|
||||
else:
|
||||
item_list = self._getUltimakerGenericProfiles(available_material_dict)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue