Browse Source

Merge pull request #6964 from Ultimaker/CURA-7087_Machine_specific_materials_not_loaded_correctly

Cura 7087 machine specific materials not loaded correctly
Evangelos Trantos 5 years ago
parent
commit
ce05f0c5a7
2 changed files with 2 additions and 2 deletions
  1. 1 1
      cura/Machines/Models/MaterialBrandsModel.py
  2. 1 1
      cura/Machines/VariantNode.py

+ 1 - 1
cura/Machines/Models/MaterialBrandsModel.py

@@ -34,7 +34,7 @@ class MaterialBrandsModel(BaseMaterialsModel):
         brand_item_list = []
         brand_item_list = []
         brand_group_dict = {}
         brand_group_dict = {}
 
 
-        # Part 1: Generate the entire tree of brands -> material types -> spcific materials
+        # Part 1: Generate the entire tree of brands -> material types -> specific materials
         for root_material_id, container_node in self._available_materials.items():
         for root_material_id, container_node in self._available_materials.items():
             # Do not include the materials from a to-be-removed package
             # Do not include the materials from a to-be-removed package
             if bool(container_node.getMetaDataEntry("removed", False)):
             if bool(container_node.getMetaDataEntry("removed", False)):

+ 1 - 1
cura/Machines/VariantNode.py

@@ -51,7 +51,7 @@ class VariantNode(ContainerNode):
         # Find all the materials for this variant's name.
         # Find all the materials for this variant's name.
         else:  # Printer has its own material profiles. Look for material profiles with this printer's definition.
         else:  # Printer has its own material profiles. Look for material profiles with this printer's definition.
             base_materials = container_registry.findInstanceContainersMetadata(type = "material", definition = "fdmprinter")
             base_materials = container_registry.findInstanceContainersMetadata(type = "material", definition = "fdmprinter")
-            printer_specific_materials = container_registry.findInstanceContainersMetadata(type = "material", definition = self.machine.container_id, variant_name = None)
+            printer_specific_materials = container_registry.findInstanceContainersMetadata(type = "material", definition = self.machine.container_id)
             variant_specific_materials = container_registry.findInstanceContainersMetadata(type = "material", definition = self.machine.container_id, variant_name = self.variant_name)  # If empty_variant, this won't return anything.
             variant_specific_materials = container_registry.findInstanceContainersMetadata(type = "material", definition = self.machine.container_id, variant_name = self.variant_name)  # If empty_variant, this won't return anything.
             materials_per_base_file = {material["base_file"]: material for material in base_materials}
             materials_per_base_file = {material["base_file"]: material for material in base_materials}
             materials_per_base_file.update({material["base_file"]: material for material in printer_specific_materials})  # Printer-specific profiles override global ones.
             materials_per_base_file.update({material["base_file"]: material for material in printer_specific_materials})  # Printer-specific profiles override global ones.