From 61db5b42b7105fa5fc375b5c09e3811c928d7f24 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 30 Nov 2016 12:57:10 +0100 Subject: [PATCH] Moved loading of meshdata in workspace to after machine has changed This fixes the issue where the location of the objects was not correct. CURA-1263 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 27993a4a47..f5d7466ad4 100644 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -128,11 +128,6 @@ class ThreeMFWorkspaceReader(WorkspaceReader): return WorkspaceReader.PreReadResult.accepted def read(self, file_name): - # Load all the nodes / meshdata of the workspace - nodes = self._3mf_mesh_reader.read(file_name) - if nodes is None: - nodes = [] - archive = zipfile.ZipFile(file_name, "r") cura_file_names = [name for name in archive.namelist() if name.startswith("Cura/")] @@ -399,6 +394,11 @@ class ThreeMFWorkspaceReader(WorkspaceReader): # Actually change the active machine. Application.getInstance().setGlobalContainerStack(global_stack) + + # Load all the nodes / meshdata of the workspace + nodes = self._3mf_mesh_reader.read(file_name) + if nodes is None: + nodes = [] return nodes def _stripFileToId(self, file):