Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaleidoscopeit <gabriele@soundcafe.it>2021-05-20 18:44:53 +0300
committerkaleidoscopeit <gabriele@soundcafe.it>2021-05-20 18:44:53 +0300
commit59a0625046ebff8194da50c6fdea224b65e64887 (patch)
tree441b9611016cb5c3a5d264a18bf5633c6cefaac4 /plugins/VersionUpgrade
parent69beba448c5341145a8ea6654ea89372d964473a (diff)
Deltacomb configs for VersionUpgrade Plugin
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py b/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py
index 8e75da6e94..7d9186e06b 100644
--- a/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py
+++ b/plugins/VersionUpgrade/VersionUpgrade49to410/VersionUpgrade49to410.py
@@ -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()]