From 3b0fdecb60b9c5e8a104564d5703c85c97c10f27 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 20 Mar 2017 17:22:11 +0100 Subject: [PATCH] Introduce an ExtruderStack class This will allow us to codify some of the assumptions made about extruders. Contributes to CURA-3497 --- cura/Settings/ExtruderStack.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cura/Settings/ExtruderStack.py diff --git a/cura/Settings/ExtruderStack.py b/cura/Settings/ExtruderStack.py new file mode 100644 index 0000000000..edcce90693 --- /dev/null +++ b/cura/Settings/ExtruderStack.py @@ -0,0 +1,19 @@ +# Copyright (c) 2017 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase +from UM.Settings.ContainerStack import ContainerStack +from UM.Settings.ContainerRegistry import ContainerRegistry + +class ExtruderStack(ContainerStack): + def __init__(self, container_id, *args, **kwargs): + super().__init__(container_id, *args, **kwargs) + +extruder_stack_mime = MimeType( + name = "application/x-cura-extruderstack", + comment = "Cura Extruder Stack", + suffixes = [ "extruder.cfg" ] +) + +MimeTypeDatabase.addMimeType(extruder_stack_mime) +ContainerRegistry.addContainerTypeByName(ExtruderStack, "extruder_stack", extruder_stack_mime.name)