mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 15:39:14 +08:00
Use new open_stream
This allows us to do something else than write to a file, too. Contributes to issue CURA-4872.
This commit is contained in:
parent
fec553dbee
commit
a9048a587d
@ -12,7 +12,7 @@ from UM.PluginRegistry import PluginRegistry #To get the g-code writer.
|
||||
class UFPWriter(MeshWriter):
|
||||
def write(self, stream, nodes, mode = MeshWriter.OutputMode.BinaryMode):
|
||||
archive = VirtualFile()
|
||||
archive.open(stream, OpenMode.WriteOnly)
|
||||
archive.open_stream(stream, "application/x-ufp", OpenMode.WriteOnly)
|
||||
|
||||
#Store the g-code from the scene.
|
||||
archive.addContentType(extension = "gcode", mime_type = "text/x-gcode")
|
||||
|
Loading…
x
Reference in New Issue
Block a user