diff options
-rwxr-xr-x | plugins/3MFReader/ThreeMFReader.py | 6 | ||||
-rw-r--r-- | plugins/3MFWriter/ThreeMFWriter.py | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 37ca1e98aa..1299b4181a 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -5,7 +5,7 @@ import os.path import zipfile from typing import List, Optional, Union, TYPE_CHECKING, cast -import Savitar +import pySavitar import numpy from UM.Logger import Logger @@ -90,7 +90,7 @@ class ThreeMFReader(MeshReader): return temp_mat - def _convertSavitarNodeToUMNode(self, savitar_node: Savitar.SceneNode, file_name: str = "") -> Optional[SceneNode]: + def _convertSavitarNodeToUMNode(self, savitar_node: pySavitar.SceneNode, file_name: str = "") -> Optional[SceneNode]: """Convenience function that converts a SceneNode object (as obtained from libSavitar) to a scene node. :returns: Scene node. @@ -206,7 +206,7 @@ class ThreeMFReader(MeshReader): try: archive = zipfile.ZipFile(file_name, "r") self._base_name = os.path.basename(file_name) - parser = Savitar.ThreeMFParser() + parser = pySavitar.ThreeMFParser() scene_3mf = parser.parse(archive.open("3D/3dmodel.model").read()) self._unit = scene_3mf.getUnit() diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index 75401c7d94..57cbe25d9e 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -15,7 +15,7 @@ from cura.Snapshot import Snapshot from PyQt6.QtCore import QBuffer -import Savitar +import pySavitar import numpy import datetime @@ -85,7 +85,7 @@ class ThreeMFWriter(MeshWriter): if um_node.callDecoration("getBuildPlateNumber") != active_build_plate_nr: return - savitar_node = Savitar.SceneNode() + savitar_node = pySavitar.SceneNode() savitar_node.setName(um_node.getName()) node_matrix = um_node.getLocalTransformation() @@ -169,7 +169,7 @@ class ThreeMFWriter(MeshWriter): # Add thumbnail relation to _rels/.rels file thumbnail_relation_element = ET.SubElement(relations_element, "Relationship", Target = "/Metadata/thumbnail.png", Id = "rel1", Type = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail") - savitar_scene = Savitar.Scene() + savitar_scene = pySavitar.Scene() metadata_to_store = CuraApplication.getInstance().getController().getScene().getMetaData() @@ -215,7 +215,7 @@ class ThreeMFWriter(MeshWriter): if savitar_node: savitar_scene.addSceneNode(savitar_node) - parser = Savitar.ThreeMFParser() + parser = pySavitar.ThreeMFParser() scene_string = parser.sceneToString(savitar_scene) archive.writestr(model_file, scene_string) |