diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py index b59d72eed8..03c5a9f6b2 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/MachineInstance.py @@ -74,8 +74,10 @@ class MachineInstance: import VersionUpgrade21to22 # Import here to prevent circular dependencies. type_name = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translatePrinter(self._type_name) - active_profile = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_profile_name) active_material = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_material_name) + active_profile = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_profile_name) + if self._type_name in VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.machinesWithMachineQuality(): #This machine now has machine-quality profiles. + active_profile += "_" + active_material #That means that the profile was split into multiple. variant = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateVariant(self._variant_name, type_name) containers = [ diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py index aea3340a10..21559fd9d6 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/Profile.py @@ -142,7 +142,7 @@ class Profile: config.set("metadata", "material", self._material_name) filenames.append(self._filename) configs.append(config) - elif self._type != "material" and self._machine_type_id in VersionUpgrade21to22.machinesWithMachineQuality(): + elif self._type != "material" and self._machine_type_id in VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.machinesWithMachineQuality(): #Split this profile into multiple profiles, one for each material. for material_id in _new_materials: filenames.append("{profile}_{material}".format(profile = self._filename, material = material_id)) diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py index 2678b7f488..add9c665e3 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py @@ -92,7 +92,7 @@ class VersionUpgrade21to22(VersionUpgrade): # # \return A set of machine identifiers. @staticmethod - def machinesWithMachineQuality(self): + def machinesWithMachineQuality(): return _machines_with_machine_quality ## Converts machine instances from format version 1 to version 2.