__init__.py 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (c) 2016 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 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. "version_upgrade": {
  10. # From To Upgrade function
  11. ("machine_instance", 2000000): ("machine_stack", 3000000, upgrade.upgradeMachineInstance),
  12. ("extruder_train", 2000000): ("extruder_train", 3000000, upgrade.upgradeExtruderTrain),
  13. ("preferences", 3000000): ("preferences", 4000000, upgrade.upgradePreferences),
  14. ("quality", 2000000): ("quality_changes", 2000000, upgrade.upgradeQuality),
  15. },
  16. "sources": {
  17. "machine_stack": {
  18. "get_version": upgrade.getCfgVersion,
  19. "location": {"./machine_instances"}
  20. },
  21. "extruder_train": {
  22. "get_version": upgrade.getCfgVersion,
  23. "location": {"./extruders"}
  24. },
  25. }
  26. }
  27. def register(app):
  28. return { "version_upgrade": upgrade }