Only exclude explicitly specified materials in the "exclude_materials" field

CURA-5344
This commit is contained in:
Lipu Fei 2018-05-29 10:45:44 +02:00
parent 09452b65df
commit 9627eb0fc1

View file

@ -291,9 +291,10 @@ class MaterialManager(QObject):
material_id_metadata_dict = dict()
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():
fallback_id = self.getFallbackMaterialIdByMaterialType(node.metadata["material"])
if fallback_id in machine_exclude_materials:
if material_id in machine_exclude_materials:
Logger.log("d", "Exclude material [%s] for machine [%s]",
material_id, machine_definition.getId())
continue