diff --git a/cura/PickingPass.py b/cura/PickingPass.py index 13a115f64b..6ffc63cbd4 100644 --- a/cura/PickingPass.py +++ b/cura/PickingPass.py @@ -54,7 +54,7 @@ class PickingPass(RenderPass): # Fill up the batch with objects that can be sliced. ` for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax. if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible(): - batch.addItem(node.getWorldTransformation(), node.getMeshData()) + batch.addItem(node.getWorldTransformation(copy = False), node.getMeshData()) self.bind() batch.render(self._scene.getActiveCamera()) diff --git a/cura/PreviewPass.py b/cura/PreviewPass.py index 9cae5ad9bd..ba139bb2b3 100644 --- a/cura/PreviewPass.py +++ b/cura/PreviewPass.py @@ -114,12 +114,12 @@ class PreviewPass(RenderPass): 1.0] uniforms["diffuse_color"] = prettier_color(diffuse_color) uniforms["diffuse_color_2"] = diffuse_color2 - batch_support_mesh.addItem(node.getWorldTransformation(), node.getMeshData(), uniforms = uniforms) + batch_support_mesh.addItem(node.getWorldTransformation(copy = False), node.getMeshData(), uniforms = uniforms) else: # Normal scene node uniforms = {} uniforms["diffuse_color"] = prettier_color(cast(CuraSceneNode, node).getDiffuseColor()) - batch.addItem(node.getWorldTransformation(), node.getMeshData(), uniforms = uniforms) + batch.addItem(node.getWorldTransformation(copy = False), node.getMeshData(), uniforms = uniforms) self.bind() diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index 3465cd3ef9..6717a98dcd 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -268,7 +268,7 @@ class ConvexHullDecorator(SceneNodeDecorator): if mesh is None: return Polygon([]) # Node has no mesh data, so just return an empty Polygon. - world_transform = self._node.getWorldTransformation() + world_transform = self._node.getWorldTransformation(copy= False) # Check the cache if mesh is self._2d_convex_hull_mesh and world_transform == self._2d_convex_hull_mesh_world_transform: diff --git a/cura/Scene/CuraSceneNode.py b/cura/Scene/CuraSceneNode.py index c22277a4b0..93a1511681 100644 --- a/cura/Scene/CuraSceneNode.py +++ b/cura/Scene/CuraSceneNode.py @@ -118,7 +118,7 @@ class CuraSceneNode(SceneNode): self._aabb = None if self._mesh_data: - self._aabb = self._mesh_data.getExtents(self.getWorldTransformation()) + self._aabb = self._mesh_data.getExtents(self.getWorldTransformation(copy = False)) else: # If there is no mesh_data, use a bounding box that encompasses the local (0,0,0) position = self.getWorldPosition() self._aabb = AxisAlignedBox(minimum = position, maximum = position) @@ -139,7 +139,7 @@ class CuraSceneNode(SceneNode): """Taken from SceneNode, but replaced SceneNode with CuraSceneNode""" copy = CuraSceneNode(no_setting_override = True) # Setting override will be added later - copy.setTransformation(self.getLocalTransformation()) + copy.setTransformation(self.getLocalTransformation(copy= False)) copy.setMeshData(self._mesh_data) copy.setVisible(cast(bool, deepcopy(self._visible, memo))) copy._selectable = cast(bool, deepcopy(self._selectable, memo)) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 20a563c291..284389064c 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -199,7 +199,7 @@ class SliceInfo(QObject, Extension): "maximum": {"x": bounding_box.maximum.x, "y": bounding_box.maximum.y, "z": bounding_box.maximum.z}} - model["transformation"] = {"data": str(node.getWorldTransformation().getData()).replace("\n", "")} + model["transformation"] = {"data": str(node.getWorldTransformation(copy = False).getData()).replace("\n", "")} extruder_position = node.callDecoration("getActiveExtruderPosition") model["extruder"] = 0 if extruder_position is None else int(extruder_position)