From ecfb62b69ec6e7726150cb7c61e27a0f0e5d6122 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 7 Mar 2018 11:00:42 +0100 Subject: [PATCH] Rename ColorChange to FilamentChange I think this is more clear to the users what this should actually do. --- .../{ColorChange.py => FilamentChange.py} | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) rename plugins/PostProcessingPlugin/scripts/{ColorChange.py => FilamentChange.py} (79%) diff --git a/plugins/PostProcessingPlugin/scripts/ColorChange.py b/plugins/PostProcessingPlugin/scripts/FilamentChange.py similarity index 79% rename from plugins/PostProcessingPlugin/scripts/ColorChange.py rename to plugins/PostProcessingPlugin/scripts/FilamentChange.py index 8db45f4033..2bb7891634 100644 --- a/plugins/PostProcessingPlugin/scripts/ColorChange.py +++ b/plugins/PostProcessingPlugin/scripts/FilamentChange.py @@ -2,17 +2,15 @@ # under the terms of the AGPLv3 or higher from ..Script import Script -#from UM.Logger import Logger -# from cura.Settings.ExtruderManager import ExtruderManager -class ColorChange(Script): +class FilamentChange(Script): def __init__(self): super().__init__() def getSettingDataString(self): return """{ - "name":"Color Change", - "key": "ColorChange", + "name":"Filament Change", + "key": "FilamentChange", "metadata": {}, "version": 2, "settings": @@ -60,17 +58,17 @@ class ColorChange(Script): if later_retract is not None and later_retract > 0.: color_change = color_change + (" L%.2f" % later_retract) - color_change = color_change + " ; Generated by ColorChange plugin" + color_change = color_change + " ; Generated by FilamentChange plugin" - layer_targets = layer_nums.split(',') + layer_targets = layer_nums.split(",") if len(layer_targets) > 0: for layer_num in layer_targets: - layer_num = int( layer_num.strip() ) + layer_num = int(layer_num.strip()) if layer_num < len(data): - layer = data[ layer_num - 1 ] + layer = data[layer_num - 1] lines = layer.split("\n") - lines.insert(2, color_change ) - final_line = "\n".join( lines ) - data[ layer_num - 1 ] = final_line + lines.insert(2, color_change) + final_line = "\n".join(lines) + data[layer_num - 1] = final_line return data