From e0c7ed85617ba54759ae2c65179ccdedbeb40236 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 23 May 2016 02:19:39 +0200 Subject: Add a plugin that loads XML materials and an example material --- plugins/XmlMaterialProfile/__init__.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 plugins/XmlMaterialProfile/__init__.py (limited to 'plugins/XmlMaterialProfile/__init__.py') diff --git a/plugins/XmlMaterialProfile/__init__.py b/plugins/XmlMaterialProfile/__init__.py new file mode 100644 index 0000000000..041a3f6346 --- /dev/null +++ b/plugins/XmlMaterialProfile/__init__.py @@ -0,0 +1,32 @@ +# Copyright (c) 2016 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from . import XmlMaterialProfile + +from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase +from UM.i18n import i18nCatalog +catalog = i18nCatalog("cura") + +def getMetaData(): + return { + "plugin": { + "name": catalog.i18nc("@label", "Material Profiles"), + "author": "Ultimaker", + "version": "1.0", + "description": catalog.i18nc("@info:whatsthis", "Provides capabilities to read and write XML-based material profiles."), + "api": 3 + }, + "settings_container": { + "mimetype": "application/x-ultimaker-material-profile" + } + } + +def register(app): + mime_type = MimeType( + name = "application/x-ultimaker-material-profile", + comment = "Ultimaker Material Profile", + suffixes = [ "xml.fdm_material" ] + ) + MimeTypeDatabase.addMimeType(mime_type) + return { "settings_container": XmlMaterialProfile.XmlMaterialProfile("default_xml_material_profile") } + -- cgit v1.2.3