diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py index 046e91e593..4ff8fec01a 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py @@ -74,11 +74,12 @@ class MachineInstance: import VersionUpgrade21to22 # Import here to prevent circular dependencies. has_machine_qualities = self._type_name in VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.machinesWithMachineQuality() type_name = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinter(self._type_name) - active_material = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_material_name) + active_material = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateMaterial(self._active_material_name) variant = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateVariant(self._variant_name, type_name) variant_materials = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateVariantForMaterials(self._variant_name, type_name) active_profile = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_profile_name) if has_machine_qualities: #This machine now has machine-quality profiles. + if active_material == "pla" active_profile += "_" + active_material + "_" + variant active_material += "_" + variant_materials #That means that the profile was split into multiple. current_settings = "empty" #The profile didn't know the definition ID when it was upgraded, so it will have been invalid. Sorry, your current settings are lost now. diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py index f907288372..bb53e8ab7f 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py @@ -32,13 +32,8 @@ _machines_with_machine_quality = { } } -## How to translate printer names from the old version to the new. -_printer_translations = { - "ultimaker2plus": "ultimaker2_plus" -} - -## How to translate profile names from the old version to the new. -_profile_translations = { +## How to translate material names from the old version to the new. +_material_translations = { "PLA": "generic_pla", "ABS": "generic_abs", "CPE": "generic_cpe", @@ -46,6 +41,15 @@ _profile_translations = { "Nylon": "generic_nylon", "PC": "generic_pc", "TPU": "generic_tpu", +} + +## How to translate printer names from the old version to the new. +_printer_translations = { + "ultimaker2plus": "ultimaker2_plus" +} + +## How to translate profile names from the old version to the new. +_profile_translations = { "Low Quality": "low", "Normal Quality": "normal", "High Quality": "high",