mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Deltacomb configs for VersionUpgrade Plugin
This commit is contained in:
parent
69beba448c
commit
59a0625046
1 changed files with 15 additions and 0 deletions
|
@ -94,6 +94,16 @@ class VersionUpgrade49to410(VersionUpgrade):
|
|||
}
|
||||
}
|
||||
|
||||
_deltacomb_quality_type_conversion = {
|
||||
"a" : "D005",
|
||||
"b" : "D010",
|
||||
"c" : "D015",
|
||||
"d" : "D020",
|
||||
"e" : "D030",
|
||||
"f" : "D045",
|
||||
"g" : "D060"
|
||||
}
|
||||
|
||||
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||
"""Upgrades instance containers to have the new version number.
|
||||
|
||||
|
@ -123,6 +133,11 @@ class VersionUpgrade49to410(VersionUpgrade):
|
|||
parser["metadata"]["quality_type"] = self._two_trees_bluer_quality_type_conversion.get(parser.get("metadata", "quality_type", fallback = "fast"), "standard")
|
||||
break
|
||||
|
||||
if os.path.basename(filename).startswith("deltacomb_"):
|
||||
parser["general"]["definition"] = "deltacomb_base"
|
||||
parser["metadata"]["quality_type"] = self._deltacomb_quality_type_conversion.get(parser.get("metadata", "quality_type", fallback = "c"), "D015")
|
||||
break
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue