From 5cf4cd03cfff52cdbfde520be1facb027fed3ff5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 31 Jul 2019 14:18:44 +0200 Subject: [PATCH 1/2] Fix importing profiles for CR10s It was somehow missing from this list. An oversight. Fixes #6083. --- .../VersionUpgrade41to42/VersionUpgrade41to42.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py index 1ffb4030c5..334ab89a6d 100644 --- a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py +++ b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py @@ -198,6 +198,7 @@ _quality_changes_to_creality_base = { "creality_cr10s5_extruder_0", "creality_ender3_extruder_0" "creality_cr10", + "creality_cr10s", "creality_cr10s4", "creality_cr10s5", "creality_ender3", @@ -238,6 +239,7 @@ class VersionUpgrade41to42(VersionUpgrade): # # This renames the renamed settings in the containers. def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]: + print("============================ upgrading instance container!") parser = configparser.ConfigParser(interpolation = None) parser.read_string(serialized) @@ -264,6 +266,7 @@ class VersionUpgrade41to42(VersionUpgrade): # For quality-changes profiles made for Creality printers, change the definition to the creality_base and make sure that the quality is something we have a profile for. if parser["metadata"].get("type", "") == "quality_changes": for possible_printer in _quality_changes_to_creality_base: + print("======================= basename:", os.path.basename(filename), "vs. possible printer", possible_printer) if os.path.basename(filename).startswith(possible_printer + "_"): parser["general"]["definition"] = "creality_base" parser["metadata"]["quality_type"] = _creality_limited_quality_type.get(parser["metadata"]["quality_type"], "draft") From 65b28f228bfc6f3ed890530bb1a6a70ea29664c1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 31 Jul 2019 14:22:23 +0200 Subject: [PATCH 2/2] Fix missing comma Otherwise it would concatenate the two strings, leading to both of them effectively missing from the set. --- .../VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py index 334ab89a6d..009be9a430 100644 --- a/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py +++ b/plugins/VersionUpgrade/VersionUpgrade41to42/VersionUpgrade41to42.py @@ -196,7 +196,7 @@ _quality_changes_to_creality_base = { "creality_cr10_extruder_0", "creality_cr10s4_extruder_0", "creality_cr10s5_extruder_0", - "creality_ender3_extruder_0" + "creality_ender3_extruder_0", "creality_cr10", "creality_cr10s", "creality_cr10s4",