From: Youness Alaoui Date: Fri, 7 Aug 2015 21:04:23 +0000 (-0400) Subject: Add version upgrade support for toolheads X-Git-Tag: lulzbot-15.02.1-2.01~15 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9a3fa49f255c37fd2ad57a3bb72ad827f5cdd07f;p=cura.git Add version upgrade support for toolheads --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 06c466a3..8b525a2f 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -1376,7 +1376,32 @@ def performVersionUpgrade(): if getMachineSetting('machine_type', n) == 'lulzbot_TAZ': putMachineSetting('machine_type', 'lulzbot_TAZ_4', n) + machine_type = getMachineSetting('machine_type', n) + if machine_type.startswith('lulzbot_') and \ + getMachineSetting('toolhead', n) == 'Default': + if machine_type == 'lulzbot_mini': + putMachineSetting('toolhead', 'Single Extruder V2', n) + putMachineSetting('toolhead_shortname', '', n) + elif machine_type == 'lulzbot_TAZ_4': + putMachineSetting('toolhead', 'Single Extruder V1', n) + putMachineSetting('toolhead_shortname', '', n) + putMachineSetting('machine_type', 'lulzbot_TAZ_4_SingleV1', n) + elif machine_type == 'lulzbot_TAZ_5': + putMachineSetting('toolhead', 'Single Extruder V2 (0.35mm nozzle)', n) + putMachineSetting('toolhead_shortname', '0.35 nozzle', n) + putMachineSetting('machine_type', 'lulzbot_TAZ_5_035nozzle', n) + machine_name = getMachineSetting('machine_name', n) + if machine_name.endswith(" (0.35 nozzle)"): + putMachineSetting('machine_name', machine_name.replace(" (0.35 nozzle)", ""), n) + elif machine_type == 'lulzbot_TAZ_5_05nozzle': + putMachineSetting('toolhead', 'Single Extruder V2 (0.5mm nozzle)', n) + putMachineSetting('toolhead_shortname', '0.5 nozzle', n) + putMachineSetting('machine_type', 'lulzbot_TAZ_5_05nozzle', n) + machine_name = getMachineSetting('machine_name', n) + if machine_name.endswith(" (0.5 nozzle)"): + putMachineSetting('machine_name', machine_name.replace(" (0.5 nozzle)", ""), n) + # Change TAZ print bed so prints are centered when scaled to the max - if getMachineSetting('machine_type', n).startswith('lulzbot_TAZ_') and \ + if machine_type.startswith('lulzbot_TAZ_') and \ getMachineSetting('machine_width', n) == '298': putMachineSetting('machine_width', '290')