diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 04fc09019b..9319280119 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -36,6 +36,10 @@ class XmlMaterialProfile(InstanceContainer): # \param xml_version: The version number found in an XML file. # \return The corresponding setting_version. def xmlVersionToSettingVersion(self, xml_version: str) -> int: + if xml_version == "1.3": + return 2 # FIXME & HACK: This is temporary hack. The setting_version has been increased in CuraApplication, + # but we haven't decided on how to determine the versions of an XMLMaterialProfile yet. + # This MUST be fixed after the decision has been made. if xml_version == "1.3": return 1 return 0 #Older than 1.3. diff --git a/plugins/XmlMaterialProfile/XmlMaterialUpgrader.py b/plugins/XmlMaterialProfile/XmlMaterialUpgrader.py index ad20a44c28..140c0712a3 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialUpgrader.py +++ b/plugins/XmlMaterialProfile/XmlMaterialUpgrader.py @@ -20,6 +20,10 @@ class XmlMaterialUpgrader(VersionUpgrade): return version * 1000000 + setting_version def _xmlVersionToSettingVersion(self, xml_version: str) -> int: + if xml_version == "1.3": + return 2 # FIXME & HACK: This is temporary hack. The setting_version has been increased in CuraApplication, + # but we haven't decided on how to determine the versions of an XMLMaterialProfile yet. + # This MUST be fixed after the decision has been made. if xml_version == "1.3": return 1 return 0 #Older than 1.3. diff --git a/plugins/XmlMaterialProfile/__init__.py b/plugins/XmlMaterialProfile/__init__.py index 63ec979fbd..3effe702be 100644 --- a/plugins/XmlMaterialProfile/__init__.py +++ b/plugins/XmlMaterialProfile/__init__.py @@ -20,6 +20,8 @@ def getMetaData(): }, "version_upgrade": { ("materials", 1000000): ("materials", 1000001, upgrader.upgradeMaterial), + # FIXME: This needs to be changed once we have decided on how to determine the versions + ("materials", 1000001): ("materials", 1000002, upgrader.upgradeMaterial), }, "sources": { "materials": {