mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 23:34:32 +08:00
Merge pull request #6206 from Ultimaker/CURA-6709_upgrade_imade3d
CURA-6709 Fix version upgrade for imade3d jellybox
This commit is contained in:
commit
0e6c05e443
@ -14,6 +14,40 @@ _renamed_profiles = {"generic_pla_0.4_coarse": "jbo_generic_pla_0.4_coarse",
|
|||||||
"generic_petg_0.4_medium": "jbo_generic_petg_medium",
|
"generic_petg_0.4_medium": "jbo_generic_petg_medium",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# - The variant "imade3d jellybox 0.4 mm 2-fans" for machine definition "imade3d_jellybox"
|
||||||
|
# is now "0.4 mm" for machine definition "imade3d jellybox_2".
|
||||||
|
# - Materials "imade3d_petg_green" and "imade3d_petg_pink" are now "imade3d_petg_175".
|
||||||
|
# - Materials "imade3d_pla_green" and "imade3d_pla_pink" are now "imade3d_petg_175".
|
||||||
|
#
|
||||||
|
# Note: Theoretically, the old material profiles with "_2-fans" at the end should be updated to:
|
||||||
|
# - machine definition: imade3d_jellybox_2
|
||||||
|
# - variant: 0.4 mm (for jellybox 2)
|
||||||
|
# - material: (as an example) imade3d_petg_175_imade3d_jellybox_2_0.4_mm
|
||||||
|
#
|
||||||
|
# But this involves changing the definition of the global stack and the extruder stacks, which can cause more trouble
|
||||||
|
# than what we can fix. So, here, we update all material variants, regardless of having "_2-fans" at the end or not, to
|
||||||
|
# jellybox_0.4_mm.
|
||||||
|
#
|
||||||
|
_renamed_material_profiles = { # PETG
|
||||||
|
"imade3d_petg_green": "imade3d_petg_175",
|
||||||
|
"imade3d_petg_green_imade3d_jellybox": "imade3d_petg_175_imade3d_jellybox",
|
||||||
|
"imade3d_petg_green_imade3d_jellybox_0.4_mm": "imade3d_petg_175_imade3d_jellybox_0.4_mm",
|
||||||
|
"imade3d_petg_green_imade3d_jellybox_0.4_mm_2-fans": "imade3d_petg_175_imade3d_jellybox_0.4_mm",
|
||||||
|
"imade3d_petg_pink": "imade3d_petg_175",
|
||||||
|
"imade3d_petg_pink_imade3d_jellybox": "imade3d_petg_175_imade3d_jellybox",
|
||||||
|
"imade3d_petg_pink_imade3d_jellybox_0.4_mm": "imade3d_petg_175_imade3d_jellybox_0.4_mm",
|
||||||
|
"imade3d_petg_pink_imade3d_jellybox_0.4_mm_2-fans": "imade3d_petg_175_imade3d_jellybox_0.4_mm",
|
||||||
|
# PLA
|
||||||
|
"imade3d_pla_green": "imade3d_pla_175",
|
||||||
|
"imade3d_pla_green_imade3d_jellybox": "imade3d_pla_175_imade3d_jellybox",
|
||||||
|
"imade3d_pla_green_imade3d_jellybox_0.4_mm": "imade3d_pla_175_imade3d_jellybox_0.4_mm",
|
||||||
|
"imade3d_pla_green_imade3d_jellybox_0.4_mm_2-fans": "imade3d_pla_175_imade3d_jellybox_0.4_mm",
|
||||||
|
"imade3d_pla_pink": "imade3d_pla_175",
|
||||||
|
"imade3d_pla_pink_imade3d_jellybox": "imade3d_pla_175_imade3d_jellybox",
|
||||||
|
"imade3d_pla_pink_imade3d_jellybox_0.4_mm": "imade3d_pla_175_imade3d_jellybox_0.4_mm",
|
||||||
|
"imade3d_pla_pink_imade3d_jellybox_0.4_mm_2-fans": "imade3d_pla_175_imade3d_jellybox_0.4_mm",
|
||||||
|
}
|
||||||
|
|
||||||
_removed_settings = {
|
_removed_settings = {
|
||||||
"start_layers_at_same_position"
|
"start_layers_at_same_position"
|
||||||
}
|
}
|
||||||
@ -114,8 +148,8 @@ class VersionUpgrade42to43(VersionUpgrade):
|
|||||||
parser["containers"]["2"] = _renamed_profiles[parser["containers"]["2"]]
|
parser["containers"]["2"] = _renamed_profiles[parser["containers"]["2"]]
|
||||||
|
|
||||||
material_id = parser["containers"]["3"]
|
material_id = parser["containers"]["3"]
|
||||||
if material_id.endswith("_2-fans"):
|
if material_id in _renamed_material_profiles:
|
||||||
parser["containers"]["3"] = material_id.replace("_2-fans", "")
|
parser["containers"]["3"] = _renamed_material_profiles[material_id]
|
||||||
variant_id = parser["containers"]["4"]
|
variant_id = parser["containers"]["4"]
|
||||||
|
|
||||||
if variant_id.endswith("_2-fans"):
|
if variant_id.endswith("_2-fans"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user