mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Translate variants and machine names
I'm not quite pleased with the variant translation being inside this function, so I'll move it to VersionUpgrade21to22 soon I think. Contributes to issue CURA-844.
This commit is contained in:
parent
f13db7de10
commit
439629d0b5
@ -67,14 +67,40 @@ class MachineInstance:
|
|||||||
config.set("general", "version", "2") # Hard-code version 2, since if this number changes the programmer MUST change this entire function.
|
config.set("general", "version", "2") # Hard-code version 2, since if this number changes the programmer MUST change this entire function.
|
||||||
|
|
||||||
import VersionUpgrade21to22 # Import here to prevent circular dependencies.
|
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_profile = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_profile_name)
|
||||||
active_material = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_material_name)
|
active_material = VersionUpgrade21to22.VersionUpgrade21to22.VersionUpgrade21to22.translateProfile(self._active_material_name)
|
||||||
|
if type_name == "ultimaker2_plus":
|
||||||
|
if self._variant_name == "0.25 mm":
|
||||||
|
variant = "ultimaker2_plus_0.25"
|
||||||
|
elif self._variant_name == "0.4 mm":
|
||||||
|
variant = "ultimaker2_plus_0.4"
|
||||||
|
elif self._variant_name == "0.6 mm":
|
||||||
|
variant = "ultimaker2_plus_0.6"
|
||||||
|
elif self._variant_name == "0.8 mm":
|
||||||
|
variant = "ultimaker2_plus_0.8"
|
||||||
|
else:
|
||||||
|
variant = self._variant_name
|
||||||
|
elif type_name == "ultimaker2_extended_plus":
|
||||||
|
if self._variant_name == "0.25 mm":
|
||||||
|
variant = "ultimaker2_extended_plus_0.25"
|
||||||
|
elif self._variant_name == "0.4 mm":
|
||||||
|
variant = "ultimaker2_extended_plus_0.4"
|
||||||
|
elif self._variant_name == "0.6 mm":
|
||||||
|
variant = "ultimaker2_extended_plus_0.6"
|
||||||
|
elif self._variant_name == "0.8 mm":
|
||||||
|
variant = "ultimaker2_extended_plus_0.8"
|
||||||
|
else:
|
||||||
|
variant = self._variant_name
|
||||||
|
else:
|
||||||
|
variant = self._variant_name
|
||||||
|
|
||||||
containers = [
|
containers = [
|
||||||
self._name,
|
self._name,
|
||||||
active_profile,
|
active_profile,
|
||||||
active_material,
|
active_material,
|
||||||
self._variant_name,
|
variant,
|
||||||
self._type_name
|
type_name
|
||||||
]
|
]
|
||||||
config.set("general", "containers", ",".join(containers))
|
config.set("general", "containers", ",".join(containers))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user