__init__.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright (c) 2017 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from . import VersionUpgrade27to30
  4. upgrade = VersionUpgrade27to30.VersionUpgrade27to30()
  5. def getMetaData():
  6. return {
  7. "version_upgrade": {
  8. # From To Upgrade function
  9. ("preferences", 4000002): ("preferences", 5000003, upgrade.upgradePreferences),
  10. ("machine_stack", 3000002): ("machine_stack", 3000003, upgrade.upgradeStack),
  11. ("extruder_train", 3000002): ("extruder_train", 3000003, upgrade.upgradeStack),
  12. ("quality_changes", 2000002): ("quality_changes", 2000003, upgrade.upgradeQualityChangesContainer),
  13. ("user", 2000002): ("user", 2000003, upgrade.upgradeOtherContainer),
  14. ("definition_changes", 2000002): ("definition_changes", 2000003, upgrade.upgradeOtherContainer),
  15. ("variant", 2000002): ("variant", 2000003, upgrade.upgradeOtherContainer)
  16. },
  17. "sources": {
  18. "preferences": {
  19. "get_version": upgrade.getCfgVersion,
  20. "location": {"."}
  21. },
  22. "machine_stack": {
  23. "get_version": upgrade.getCfgVersion,
  24. "location": {"./machine_instances"}
  25. },
  26. "extruder_train": {
  27. "get_version": upgrade.getCfgVersion,
  28. "location": {"./extruders"}
  29. },
  30. "quality_changes": {
  31. "get_version": upgrade.getCfgVersion,
  32. "location": {"./quality"}
  33. },
  34. "user": {
  35. "get_version": upgrade.getCfgVersion,
  36. "location": {"./user"}
  37. },
  38. "definition_changes": {
  39. "get_version": upgrade.getCfgVersion,
  40. "location": {"./definition_changes"}
  41. },
  42. "variant": {
  43. "get_version": upgrade.getCfgVersion,
  44. "location": {"./variants"}
  45. }
  46. }
  47. }
  48. def register(app):
  49. return { "version_upgrade": upgrade }