__init__.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright (c) 2016 Ultimaker B.V.
  2. # Cura is released under the terms of the AGPLv3 or higher.
  3. from . import VersionUpgrade
  4. from UM.i18n import i18nCatalog
  5. catalog = i18nCatalog("cura")
  6. upgrade = VersionUpgrade.VersionUpgrade22to24()
  7. def getMetaData():
  8. return {
  9. "plugin": {
  10. "name": catalog.i18nc("@label", "Version Upgrade 2.2 to 2.4"),
  11. "author": "Ultimaker",
  12. "version": "1.0",
  13. "description": catalog.i18nc("@info:whatsthis", "Upgrades configurations from Cura 2.2 to Cura 2.4."),
  14. "api": 3
  15. },
  16. "version_upgrade": {
  17. # From To Upgrade function
  18. ("machine_instance", 2): ("machine_stack", 3, upgrade.upgradeMachineInstance),
  19. ("extruder_train", 2): ("extruder_train", 3, upgrade.upgradeExtruderTrain),
  20. ("preferences", 3): ("preferences", 4, upgrade.upgradePreferences)
  21. },
  22. "sources": {
  23. "machine_stack": {
  24. "get_version": upgrade.getCfgVersion,
  25. "location": {"./machine_instances"}
  26. },
  27. "extruder_train": {
  28. "get_version": upgrade.getCfgVersion,
  29. "location": {"./extruders"}
  30. },
  31. }
  32. }
  33. def register(app):
  34. return { "version_upgrade": upgrade }