mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Add version upgrade plug-in for 4.0 to 4.1
This currently only updates the stack files, but all files have to be upgraded because of that stupid setting_version. Contributes to issue CURA-5848.
This commit is contained in:
parent
139ab2e0bb
commit
265a1b3fa0
5 changed files with 136 additions and 3 deletions
39
plugins/VersionUpgrade/VersionUpgrade40to41/__init__.py
Normal file
39
plugins/VersionUpgrade/VersionUpgrade40to41/__init__.py
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from typing import Any, Dict, TYPE_CHECKING
|
||||
|
||||
from . import VersionUpgrade40to41
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from UM.Application import Application
|
||||
|
||||
upgrade = VersionUpgrade40to41.VersionUpgrade40to41()
|
||||
|
||||
def getMetaData() -> Dict[str, Any]:
|
||||
return {
|
||||
"version_upgrade": {
|
||||
# From To Upgrade function
|
||||
("machine_stack", 4000005): ("machine_stack", 4000006, upgrade.upgradeStack),
|
||||
("extruder_train", 4000005): ("extruder_train", 4000006, upgrade.upgradeStack),
|
||||
("preferences", 6000005): ("preferences", 6000006, upgrade.upgradePreferences),
|
||||
("definition_changes", 4000005): ("definition_changes", 4000006, upgrade.upgradeInstanceContainer),
|
||||
("quality_changes", 4000005): ("quality_changes", 4000006, upgrade.upgradeInstanceContainer),
|
||||
("quality", 4000005): ("quality", 4000006, upgrade.upgradeInstanceContainer),
|
||||
("user", 4000005): ("user", 4000006, upgrade.upgradeInstanceContainer),
|
||||
},
|
||||
"sources": {
|
||||
"machine_stack": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./machine_instances"}
|
||||
},
|
||||
"extruder_train": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./extruders"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def register(app: "Application") -> Dict[str, Any]:
|
||||
return { "version_upgrade": upgrade }
|
||||
Loading…
Add table
Add a link
Reference in a new issue