mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Check if there is any gcode in the scene before executing a post process
This commit is contained in:
parent
3927c70625
commit
9d267cb9c7
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue