Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjen Hiemstra <ahiemstra@heimr.nl>2016-05-23 03:19:39 +0300
committerArjen Hiemstra <ahiemstra@heimr.nl>2016-05-23 03:19:39 +0300
commite0c7ed85617ba54759ae2c65179ccdedbeb40236 (patch)
tree499e4f0f03d51adc2350079d393f36abed50a4d1 /plugins/XmlMaterialProfile/__init__.py
parentb452cf7ba4b3ae0f2df84b01ce828d1ca4d55dae (diff)
Add a plugin that loads XML materials and an example material
Diffstat (limited to 'plugins/XmlMaterialProfile/__init__.py')
-rw-r--r--plugins/XmlMaterialProfile/__init__.py32
1 files changed, 32 insertions, 0 deletions
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") }
+