From 13d0fbdea7fc1153ba7955f9fea6afe7e54b771a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Oct 2020 14:32:00 +0200 Subject: [PATCH] Don't attempt to send the empty material We can't send it because sending it looks up the serialised form on disk, and there is no file for this one on disk. Contributes to issue CURA-7501. --- plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py index 2740f86605..28f6b29dd9 100644 --- a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py +++ b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py @@ -81,6 +81,8 @@ class SendMaterialJob(Job): container_registry = CuraApplication.getInstance().getContainerRegistry() all_materials = container_registry.findInstanceContainersMetadata(type = "material") all_base_files = {material["base_file"] for material in all_materials if "base_file" in material} # Filters out uniques by making it a set. Don't include files without base file (i.e. empty material). + if "empty_material" in all_base_files: + all_base_files.remove("empty_material") # Don't send the empty material. for root_material_id in all_base_files: if root_material_id not in materials_to_send: