diff --git a/plugins/VersionUpgrade/VersionUpgrade32to33/VersionUpgrade32to33.py b/plugins/VersionUpgrade/VersionUpgrade32to33/VersionUpgrade32to33.py new file mode 100644 index 0000000000..64eded8b2e --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade32to33/VersionUpgrade32to33.py @@ -0,0 +1,18 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +import configparser #To parse preference files. +import io #To serialise the preference files afterwards. + +from UM.VersionUpgrade import VersionUpgrade #We're inheriting from this. + +## Upgrades configurations from the state they were in at version 3.2 to the +# state they should be in at version 3.3. +class VersionUpgrade32to33(VersionUpgrade): + ## Gets the version number from a CFG file. + def getCfgVersion(self, serialized): + raise NotImplementedError("This has not yet been implemented.") + + ## Upgrades a quality container to the new format. + def upgradeQuality(self, serialized, filename): + raise NotImplementedError("This has not yet been implemented.") \ No newline at end of file diff --git a/plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py b/plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py new file mode 100644 index 0000000000..dbcad86ac4 --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py @@ -0,0 +1,23 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +from . import VersionUpgrade32to33 + +upgrade = VersionUpgrade32to33.VersionUpgrade32to33() + +def getMetaData(): + return { + "version_upgrade": { + # From To Upgrade function + ("quality", 2000004): ("quality", 3000004, upgrade.upgradeQuality), + }, + "sources": { + "quality": { + "get_version": upgrade.getCfgVersion, + "location": {"./quality"} + } + } + } + +def register(app): + return { "version_upgrade": upgrade } \ No newline at end of file diff --git a/plugins/VersionUpgrade/VersionUpgrade32to33/plugin.json b/plugins/VersionUpgrade/VersionUpgrade32to33/plugin.json new file mode 100644 index 0000000000..fbce09c807 --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade32to33/plugin.json @@ -0,0 +1,8 @@ + { + "name": "Version Upgrade 3.2 to 3.3", + "author": "Ultimaker B.V.", + "version": "1.0.0", + "description": "Upgrades configurations from Cura 3.2 to Cura 3.3.", + "api": 4, + "i18n-catalog": "cura" +}