Skip to content

Commit

Permalink
Fix importing profiles for CR10s
Browse files Browse the repository at this point in the history
It was somehow missing from this list. An oversight.

Fixes #6083.
  • Loading branch information
Ghostkeeper committed Jul 31, 2019
1 parent 4b95695 commit 5cf4cd0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
"creality_cr10s5_extruder_0",
"creality_ender3_extruder_0"
"creality_cr10",
"creality_cr10s",
"creality_cr10s4",
"creality_cr10s5",
"creality_ender3",
Expand Down Expand Up @@ -238,6 +239,7 @@ def getCfgVersion(self, serialised: str) -> int:
#
# 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)

Expand All @@ -264,6 +266,7 @@ def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List
# 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")
Expand Down

0 comments on commit 5cf4cd0

Please sign in to comment.