From 8a3a3d32daf3fb20507c2dc57690842c4293c11d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 26 Jan 2018 13:34:45 +0100 Subject: [PATCH] Fix imports to Charon classes Contributes to issue CURA-4872. --- plugins/UFPWriter/UFPWriter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/UFPWriter/UFPWriter.py b/plugins/UFPWriter/UFPWriter.py index fd51d7645c..689e696839 100644 --- a/plugins/UFPWriter/UFPWriter.py +++ b/plugins/UFPWriter/UFPWriter.py @@ -1,15 +1,16 @@ #Copyright (c) 2018 Ultimaker B.V. #Cura is released under the terms of the LGPLv3 or higher. -import charon +from charon.VirtualFile import VirtualFile #To open UFP files. +from charon.OpenMode import OpenMode #To indicate that we want to write to UFP files. from UM.Mesh.MeshWriter import MeshWriter #The writer we need to implement. from UM.PluginRegistry import PluginRegistry #To get the g-code writer. class UFPWriter(MeshWriter): def write(self, stream, nodes, mode = MeshWriter.OutputMode.BinaryMode): - archive = charon.VirtualFile() - archive.open(stream, charon.OpenMode.WriteOnly) + archive = VirtualFile() + archive.open(stream, OpenMode.WriteOnly) #Store the g-code from the scene. archive.addContentType(extension = "gcode", mime_type = "text/x-gcode")