mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 23:53:56 -06:00
Consolidate log entries about excluded materials
I got a log where 80% of the log was this particular message. Let's not do that.
This commit is contained in:
parent
a80fde1495
commit
b26c78202b
1 changed files with 4 additions and 2 deletions
|
@ -337,6 +337,7 @@ class MaterialManager(QObject):
|
||||||
machine_exclude_materials = machine_definition.getMetaDataEntry("exclude_materials", [])
|
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]
|
||||||
|
excluded_materials = set()
|
||||||
for current_node in nodes_to_check:
|
for current_node in nodes_to_check:
|
||||||
if current_node is None:
|
if current_node is None:
|
||||||
continue
|
continue
|
||||||
|
@ -345,13 +346,14 @@ class MaterialManager(QObject):
|
||||||
# Do not exclude other materials that are of the same type.
|
# Do not exclude other materials that are of the same type.
|
||||||
for material_id, node in current_node.material_map.items():
|
for material_id, node in current_node.material_map.items():
|
||||||
if material_id in machine_exclude_materials:
|
if material_id in machine_exclude_materials:
|
||||||
Logger.log("d", "Exclude material [%s] for machine [%s]",
|
excluded_materials.add(material_id)
|
||||||
material_id, machine_definition.getId())
|
|
||||||
continue
|
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
|
||||||
|
|
||||||
|
Logger.log("d", "Exclude materials {excluded_materials} for machine {machine_definition_id}".format(excluded_materials = ", ".join(excluded_materials), machine_definition_id = machine_definition_id))
|
||||||
|
|
||||||
return material_id_metadata_dict
|
return material_id_metadata_dict
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue