diff --git a/plugins/PostProcessingPlugin/scripts/FilamentChange.py b/plugins/PostProcessingPlugin/scripts/FilamentChange.py index 0fa52de4f1..ed0f6eb174 100644 --- a/plugins/PostProcessingPlugin/scripts/FilamentChange.py +++ b/plugins/PostProcessingPlugin/scripts/FilamentChange.py @@ -1,5 +1,6 @@ -# This PostProcessing Plugin script is released -# under the terms of the AGPLv3 or higher +# Copyright (c) 2018 Ultimaker B.V. +# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. + from typing import Optional, Tuple from UM.Logger import Logger @@ -54,17 +55,17 @@ class FilamentChange(Script): layer_nums = self.getSettingValueByKey("layer_number") initial_retract = self.getSettingValueByKey("initial_retract") later_retract = self.getSettingValueByKey("later_retract") - + color_change = "M600" - + if initial_retract is not None and initial_retract > 0.: - color_change = color_change + (" E-%.2f" % initial_retract) - + color_change = color_change + (" E%.2f" % initial_retract) + if later_retract is not None and later_retract > 0.: - color_change = color_change + (" L-%.2f" % later_retract) - + color_change = color_change + (" L%.2f" % later_retract) + color_change = color_change + " ; Generated by FilamentChange plugin" - + layer_targets = layer_nums.split(",") if len(layer_targets) > 0: for layer_num in layer_targets: