mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 02:26:10 +08:00
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:
parent
a18f77abdd
commit
f5c9458e86
@ -287,19 +287,10 @@ class MaterialManager(QObject):
|
|||||||
# 1. variant-specific material
|
# 1. variant-specific material
|
||||||
# 2. machine-specific material
|
# 2. machine-specific material
|
||||||
# 3. generic material (for fdmprinter)
|
# 3. generic material (for fdmprinter)
|
||||||
machine_exclude_materials = machine_definition.getMetaDataEntry("exclude_materials", [])
|
|
||||||
|
|
||||||
material_id_metadata_dict = dict() # type: Dict[str, MaterialNode]
|
material_id_metadata_dict = dict() # type: Dict[str, MaterialNode]
|
||||||
for node in nodes_to_check:
|
for node in nodes_to_check:
|
||||||
if node is not None:
|
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():
|
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:
|
if material_id not in material_id_metadata_dict:
|
||||||
material_id_metadata_dict[material_id] = node
|
material_id_metadata_dict[material_id] = node
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user