mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Change imported namespace pySavitar to Savitar
Because we had to rename our Python bindings module from Savitar to pySavitar we also changed our import downstream (Cura and Uranium). But in order to limit the changes on our existing code we decided during the review that we should just import pySavitar as Savitar. Contributes to CURA-7924
This commit is contained in:
parent
47588393e8
commit
ca430c80be
2 changed files with 12 additions and 12 deletions
|
@ -1,11 +1,11 @@
|
|||
# Copyright (c) 2021 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
# Copyright (c) 2021-2022 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import os.path
|
||||
import zipfile
|
||||
from typing import List, Optional, Union, TYPE_CHECKING, cast
|
||||
|
||||
import pySavitar
|
||||
import pySavitar as Savitar
|
||||
import numpy
|
||||
|
||||
from UM.Logger import Logger
|
||||
|
@ -90,7 +90,7 @@ class ThreeMFReader(MeshReader):
|
|||
|
||||
return temp_mat
|
||||
|
||||
def _convertSavitarNodeToUMNode(self, savitar_node: pySavitar.SceneNode, file_name: str = "") -> Optional[SceneNode]:
|
||||
def _convertSavitarNodeToUMNode(self, savitar_node: Savitar.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 = pySavitar.ThreeMFParser()
|
||||
parser = Savitar.ThreeMFParser()
|
||||
scene_3mf = parser.parse(archive.open("3D/3dmodel.model").read())
|
||||
self._unit = scene_3mf.getUnit()
|
||||
|
||||
|
@ -304,4 +304,4 @@ class ThreeMFReader(MeshReader):
|
|||
unit = "millimeter"
|
||||
|
||||
scale = conversion_to_mm[unit]
|
||||
return Vector(scale, scale, scale)
|
||||
return Vector(scale, scale, scale)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue