mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 09:09:03 +08:00
Merge branch '4.2'
This commit is contained in:
commit
52f5a1f8bc
@ -239,7 +239,6 @@ class VersionUpgrade41to42(VersionUpgrade):
|
|||||||
#
|
#
|
||||||
# This renames the renamed settings in the containers.
|
# This renames the renamed settings in the containers.
|
||||||
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||||
print("============================ upgrading instance container!")
|
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialized)
|
parser.read_string(serialized)
|
||||||
|
|
||||||
@ -266,7 +265,6 @@ 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.
|
# 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":
|
if parser["metadata"].get("type", "") == "quality_changes":
|
||||||
for possible_printer in _quality_changes_to_creality_base:
|
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 + "_"):
|
if os.path.basename(filename).startswith(possible_printer + "_"):
|
||||||
parser["general"]["definition"] = "creality_base"
|
parser["general"]["definition"] = "creality_base"
|
||||||
parser["metadata"]["quality_type"] = _creality_limited_quality_type.get(parser["metadata"]["quality_type"], "draft")
|
parser["metadata"]["quality_type"] = _creality_limited_quality_type.get(parser["metadata"]["quality_type"], "draft")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user