mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Add exception for UM3 to add UFP as supported format
We can't just add it to the supported file formats in the definition because we don't want the removable drive output to write it. Contributes to issue CURA-5097.
This commit is contained in:
parent
6f9e0431bb
commit
864cbe9c63
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,7 @@ from UM.Message import Message
|
|||
from UM.Qt.Duration import Duration, DurationFormat
|
||||
from UM.OutputDevice import OutputDeviceError #To show that something went wrong when writing.
|
||||
from UM.Scene.SceneNode import SceneNode #For typing.
|
||||
from UM.Version import Version #To check against firmware versions for support.
|
||||
|
||||
from cura.PrinterOutput.NetworkedPrinterOutputDevice import NetworkedPrinterOutputDevice, AuthState
|
||||
from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
|
||||
|
@ -96,6 +97,9 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
#Create a list from the supported file formats string.
|
||||
machine_file_formats = Application.getInstance().getGlobalContainerStack().getMetaDataEntry("file_formats").split(";")
|
||||
machine_file_formats = [file_type.strip() for file_type in machine_file_formats]
|
||||
#Exception for UM3 firmware version >=4.4: UFP is now supported and should be the preferred file format.
|
||||
if "application/x-ufp" not in machine_file_formats and self.printerType == "ultimaker3" and Version(self.firmwareVersion) >= Version("4.4"):
|
||||
machine_file_formats = ["application/x-ufp"] + 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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue