From 0bcd5eba487698a373f74e65f8b8dec935e1832c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 24 Sep 2021 13:09:37 +0200 Subject: [PATCH] Add print_temperature to print temperature settings This way it is recognised as a command to set the printing temperature, and will prevent Cura from putting its own temperature commands in. Fixes issue reported here: https://www.reddit.com/r/Cura/comments/pu98kc/stop_initial_hotend_heatup/ --- plugins/CuraEngineBackend/StartSliceJob.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index de3b375e28..dfe478cb2b 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.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 numpy @@ -455,9 +455,9 @@ class StartSliceJob(Job): bed_temperature_settings = ["material_bed_temperature", "material_bed_temperature_layer_0"] pattern = r"\{(%s)(,\s?\w+)?\}" % "|".join(bed_temperature_settings) # match {setting} as well as {setting, extruder_nr} settings["material_bed_temp_prepend"] = re.search(pattern, start_gcode) == None - print_temperature_settings = ["material_print_temperature", "material_print_temperature_layer_0", "default_material_print_temperature", "material_initial_print_temperature", "material_final_print_temperature", "material_standby_temperature"] + print_temperature_settings = ["material_print_temperature", "material_print_temperature_layer_0", "default_material_print_temperature", "material_initial_print_temperature", "material_final_print_temperature", "material_standby_temperature", "print_temperature"] pattern = r"\{(%s)(,\s?\w+)?\}" % "|".join(print_temperature_settings) # match {setting} as well as {setting, extruder_nr} - settings["material_print_temp_prepend"] = re.search(pattern, start_gcode) == None + settings["material_print_temp_prepend"] = re.search(pattern, start_gcode) is None # Replace the setting tokens in start and end g-code. # Use values from the first used extruder by default so we get the expected temperatures