mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura into libArachne_rebased
This commit is contained in:
commit
cfb147853e
324 changed files with 5860 additions and 3984 deletions
|
@ -122,7 +122,7 @@ class VersionUpgrade42to43(VersionUpgrade):
|
|||
# Update version number.
|
||||
parser["metadata"]["setting_version"] = "9"
|
||||
# Handle changes for the imade3d jellybox. The machine was split up into parts (eg; a 2 fan version and a single
|
||||
# fan version. Perviously it used variants for this. The only upgrade we can do here is strip that variant.
|
||||
# fan version. Previously it used variants for this. The only upgrade we can do here is strip that variant.
|
||||
# This is because we only upgrade per stack (and to fully do these changes, we'd need to switch out something
|
||||
# in the global container based on changes made to the extruder stack)
|
||||
if parser["containers"]["6"] == "imade3d_jellybox_extruder_0":
|
||||
|
|
|
@ -104,6 +104,25 @@ class VersionUpgrade49to410(VersionUpgrade):
|
|||
"g" : "D060"
|
||||
}
|
||||
|
||||
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||
"""
|
||||
Upgrades preferences to have the new version number.
|
||||
:param serialized: The original contents of the preferences file.
|
||||
:param filename: The file name of the preferences file.
|
||||
:return: A list of new file names, and a list of the new contents for
|
||||
those files.
|
||||
"""
|
||||
parser = configparser.ConfigParser(interpolation = None)
|
||||
parser.read_string(serialized)
|
||||
|
||||
# Update version number.
|
||||
parser["metadata"]["setting_version"] = "17"
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
|
||||
|
||||
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||
"""Upgrades instance containers to have the new version number.
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ def getMetaData() -> Dict[str, Any]:
|
|||
("quality_changes", 4000016): ("quality_changes", 4000017, upgrade.upgradeInstanceContainer),
|
||||
("quality", 4000016): ("quality", 4000017, upgrade.upgradeInstanceContainer),
|
||||
("user", 4000016): ("user", 4000017, upgrade.upgradeInstanceContainer),
|
||||
("preferences", 7000016): ("preferences", 7000017, upgrade.upgradePreferences),
|
||||
},
|
||||
"sources": {
|
||||
"machine_stack": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue