From 8ede981a2c8b5a7977c83c27316193fc8a6ab5c2 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 29 May 2017 14:19:50 +0200 Subject: [PATCH] Set version in when saving XML material files CURA-3884 --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 7519565302..6e91e56930 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -19,6 +19,7 @@ from cura.Settings.CuraContainerRegistry import CuraContainerRegistry ## Handles serializing and deserializing material containers from an XML file class XmlMaterialProfile(InstanceContainer): + CurrentFdmMaterialVersion = "1.3" Version = 1 def __init__(self, container_id, *args, **kwargs): @@ -124,7 +125,9 @@ class XmlMaterialProfile(InstanceContainer): builder = ET.TreeBuilder() - root = builder.start("fdmmaterial", { "xmlns": "http://www.ultimaker.com/material"}) + root = builder.start("fdmmaterial", + {"xmlns": "http://www.ultimaker.com/material", + "version": self.CurrentFdmMaterialVersion}) ## Begin Metadata Block builder.start("metadata")