__init__.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from typing import Any, Dict, TYPE_CHECKING
  4. from . import VersionUpgrade33to34
  5. if TYPE_CHECKING:
  6. from UM.Application import Application
  7. upgrade = VersionUpgrade33to34.VersionUpgrade33to34()
  8. def getMetaData() -> Dict[str, Any]:
  9. return {
  10. "version_upgrade": {
  11. # From To Upgrade function
  12. ("definition_changes", 3000004): ("definition_changes", 4000004, upgrade.upgradeInstanceContainer),
  13. ("quality_changes", 3000004): ("quality_changes", 4000004, upgrade.upgradeInstanceContainer),
  14. ("quality", 3000004): ("quality", 4000004, upgrade.upgradeInstanceContainer),
  15. ("user", 3000004): ("user", 4000004, upgrade.upgradeInstanceContainer),
  16. },
  17. "sources": {
  18. "definition_changes": {
  19. "get_version": upgrade.getCfgVersion,
  20. "location": {"./definition_changes"}
  21. },
  22. "quality_changes": {
  23. "get_version": upgrade.getCfgVersion,
  24. "location": {"./quality_changes"}
  25. },
  26. "quality": {
  27. "get_version": upgrade.getCfgVersion,
  28. "location": {"./quality"}
  29. },
  30. "user": {
  31. "get_version": upgrade.getCfgVersion,
  32. "location": {"./user"}
  33. }
  34. }
  35. }
  36. def register(app: "Application") -> Dict[str, Any]:
  37. return { "version_upgrade": upgrade }