Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2019-08-27 15:17:57 +0300
committerJaime van Kessel <nallath@gmail.com>2019-08-27 15:17:57 +0300
commit1d9d41173218f687550bc218e3ef1ac32ccf5fd2 (patch)
tree84f6e75b091826b542b79a74bc74b2170f121e77 /plugins/VersionUpgrade
parent20201c65e60f753e4efd3e540f5a1e6e6cc15d4a (diff)
parent867a881de91deb017fb05518113ed975c0246397 (diff)
Merge branch 'master' of github.com:Ultimaker/Cura into feature_intent
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py38
1 files changed, 36 insertions, 2 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py b/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py
index 71b665ad7c..6bcf43dc71 100644
--- a/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py
+++ b/plugins/VersionUpgrade/VersionUpgrade42to43/VersionUpgrade42to43.py
@@ -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",
}
+# - 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 = {
"start_layers_at_same_position"
}
@@ -114,8 +148,8 @@ class VersionUpgrade42to43(VersionUpgrade):
parser["containers"]["2"] = _renamed_profiles[parser["containers"]["2"]]
material_id = parser["containers"]["3"]
- if material_id.endswith("_2-fans"):
- parser["containers"]["3"] = material_id.replace("_2-fans", "")
+ if material_id in _renamed_material_profiles:
+ parser["containers"]["3"] = _renamed_material_profiles[material_id]
variant_id = parser["containers"]["4"]
if variant_id.endswith("_2-fans"):