diff options
author | Ian Paschal <ianpaschal@users.noreply.github.com> | 2018-05-29 14:13:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-29 14:13:35 +0300 |
commit | 47bd94608a9ee8797a5a2e14e402df04200aa8b2 (patch) | |
tree | 47f70f8eac01b58e72718e3b94a47064e1efa02a /plugins/VersionUpgrade/VersionUpgrade33to34 | |
parent | 77feb95191317a6e7bf077127a6a4d3293f67955 (diff) | |
parent | 0d89240bca0c57ac7d6d6486fca9ecc35248fce1 (diff) |
Merge pull request #3413 from BagelOrb/infill_support
settings for infill support
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade33to34')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py b/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py index 17abace547..e2241fd195 100644 --- a/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py +++ b/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py @@ -6,6 +6,9 @@ import io #To serialise the preference files afterwards. from UM.VersionUpgrade import VersionUpgrade #We're inheriting from this. +_renamed_settings = { + "infill_hollow": "infill_support_enabled" +} ## Upgrades configurations from the state they were in at version 3.3 to the # state they should be in at version 3.4. @@ -38,6 +41,17 @@ class VersionUpgrade33to34(VersionUpgrade): # Update version number. parser["general"]["version"] = "4" + if "values" in parser: + #If infill_hollow was enabled and the overhang angle was adjusted, copy that overhang angle to the new infill support angle. + if "infill_hollow" in parser["values"] and parser["values"]["infill_hollow"] and "support_angle" in parser["values"]: + parser["values"]["infill_support_angle"] = parser["values"]["support_angle"] + + #Renamed settings. + for original, replacement in _renamed_settings.items(): + if original in parser["values"]: + parser["values"][replacement] = parser["values"][original] + del parser["values"][original] + result = io.StringIO() parser.write(result) - return [filename], [result.getvalue()] + return [filename], [result.getvalue()]
\ No newline at end of file |