mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
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.
This commit is contained in:
parent
7a464a92ca
commit
c9a23d5ca3
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
file_formats = Application.getInstance().getMeshFileHandler().getSupportedFileTypesWrite()
|
file_formats = Application.getInstance().getMeshFileHandler().getSupportedFileTypesWrite()
|
||||||
|
|
||||||
#Create a list from the supported file formats string.
|
#Create a list from the supported file formats string.
|
||||||
container = Application.getInstance().getGlobalContainerStack().findContainer({"file_formats": "*"})
|
machine_file_formats = Application.getInstance().getGlobalContainerStack().getMetaDataEntry("file_formats").split(";")
|
||||||
machine_file_formats = [file_type.strip() for file_type in container.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.
|
# Take the intersection between file_formats and machine_file_formats.
|
||||||
format_by_mimetype = {format["mime_type"]: format for format in file_formats}
|
format_by_mimetype = {format["mime_type"]: format for format in file_formats}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue