From c9a23d5ca35452a7b366a28263020495439d6bf6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 19 Mar 2018 14:21:41 +0100 Subject: [PATCH] Get the file formats directly from the stack Instead of finding the container that contains the entry first and then getting the metadata from there. Contributes to issue CURA-5097. --- plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index dfde76b233..431adec145 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -94,8 +94,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): file_formats = Application.getInstance().getMeshFileHandler().getSupportedFileTypesWrite() #Create a list from the supported file formats string. - container = Application.getInstance().getGlobalContainerStack().findContainer({"file_formats": "*"}) - machine_file_formats = [file_type.strip() for file_type in container.getMetaDataEntry("file_formats").split(";")] + machine_file_formats = Application.getInstance().getGlobalContainerStack().getMetaDataEntry("file_formats").split(";") + machine_file_formats = [file_type.strip() for file_type in machine_file_formats] # Take the intersection between file_formats and machine_file_formats. format_by_mimetype = {format["mime_type"]: format for format in file_formats}