From e3eb75ab6eef45a7bdd70d4a450c54fec249d6ff Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 22 Nov 2016 13:37:11 +0100 Subject: [PATCH] We now get material container by mimetype CURA-1263 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 5a818a2407..265e4cc074 100644 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -7,6 +7,7 @@ from UM.Settings.ContainerStack import ContainerStack from UM.Settings.DefinitionContainer import DefinitionContainer from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.ContainerRegistry import ContainerRegistry +from UM.MimeTypeDatabase import MimeTypeDatabase from UM.Preferences import Preferences from .WorkspaceDialog import WorkspaceDialog @@ -359,9 +360,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader): return file.replace("Cura/", "").split(".")[0] def _getXmlProfileClass(self): - for type_name, container_type in self._container_registry.getContainerTypes(): - if type_name == "XmlMaterialProfile": - return container_type + return self._container_registry.getContainerForMimeType(MimeTypeDatabase.getMimeType("application/x-ultimaker-material-profile")) ## Get the list of ID's of all containers in a container stack by partially parsing it's serialized data. def _getContainerIdListFromSerialized(self, serialized):