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:
authorGhostkeeper <rubend@tutanota.com>2021-06-17 18:57:51 +0300
committerGhostkeeper <rubend@tutanota.com>2021-06-17 18:57:51 +0300
commit3300192abc6812997f468af6655c8ba8c02547cb (patch)
treee45382038e520a36017472dd93c4c8905846490a /plugins/VersionUpgrade
parent611208368ca5ab40d91453a7084938429bce7dab (diff)
Change outer_before_inner setting to an enum
We'll offer the option to print from outside to inside, from inside to outside, or from inside to outside except that the very innermost centre wall is printed last. Contributes to issue CURA-8109.
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py b/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py
index 7757a45c25..168ed12669 100644
--- a/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py
+++ b/plugins/VersionUpgrade/VersionUpgrade49to50/VersionUpgrade49to50.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Ultimaker B.V.
+# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser
@@ -38,6 +38,12 @@ class VersionUpgrade49to50(VersionUpgrade):
for removed in _removed_settings:
if removed in visible_settings:
visible_settings.remove(removed)
+
+ # Replace Outer Before Inner Walls with equivalent.
+ if "outer_inset_first" in visible_settings:
+ visible_settings.remove("outer_inset_first")
+ visible_settings.add("inset_direction")
+
parser["general"]["visible_settings"] = ";".join(visible_settings)
result = io.StringIO()
@@ -69,6 +75,13 @@ class VersionUpgrade49to50(VersionUpgrade):
if removed in parser["values"]:
del parser["values"][removed]
+ # Replace Outer Before Inner Walls with equivalent setting.
+ if "outer_inset_first" in parser["values"]:
+ old_value = parser["values"]["outer_inset_first"]
+ if old_value.startswith("="): # Was already a formula.
+ old_value = old_value[1:]
+ parser["values"]["inset_direction"] = f"='outside_in' if ({old_value}) else 'inside_out'" # Makes it work both with plain setting values and formulas.
+
# Disable Fuzzy Skin as it doesn't work with with the libArachne walls
if "magic_fuzzy_skin_enabled" in parser["values"]:
parser["values"]["magic_fuzzy_skin_enabled"] = "False"