From 9d267cb9c7828393818e1f3f9a4a4d66bca1569e Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 31 Jan 2018 14:36:16 +0100 Subject: [PATCH] Check if there is any gcode in the scene before executing a post process --- plugins/PostProcessingPlugin/PostProcessingPlugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index 657e5c5387..2c6fc3f492 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -54,6 +54,9 @@ class PostProcessingPlugin(QObject, Extension): ## Execute all post-processing scripts on the gcode. def execute(self, output_device): scene = Application.getInstance().getController().getScene() + # If the scene does not have a gcode, do nothing + if not hasattr(scene, "gcode_dict"): + return gcode_dict = getattr(scene, "gcode_dict") if not gcode_dict: return