Remove mechanism for exclude_materials

The fields were gone from the data, but now we remove the mechanism too.

Contributes to issue CURA-5460.
This commit is contained in:
Ghostkeeper 2018-07-10 09:37:52 +02:00
parent a18f77abdd
commit f5c9458e86
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -287,19 +287,10 @@ class MaterialManager(QObject):
# 1. variant-specific material
# 2. machine-specific material
# 3. generic material (for fdmprinter)
machine_exclude_materials = machine_definition.getMetaDataEntry("exclude_materials", [])
material_id_metadata_dict = dict() # type: Dict[str, MaterialNode]
for node in nodes_to_check:
if node is not None:
# Only exclude the materials that are explicitly specified in the "exclude_materials" field.
# Do not exclude other materials that are of the same type.
for material_id, node in node.material_map.items():
if material_id in machine_exclude_materials:
Logger.log("d", "Exclude material [%s] for machine [%s]",
material_id, machine_definition.getId())
continue
if material_id not in material_id_metadata_dict:
material_id_metadata_dict[material_id] = node