mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:49:01 +08:00
Check if there is any gcode in the scene before executing a post process
This commit is contained in:
parent
3927c70625
commit
9d267cb9c7
@ -54,6 +54,9 @@ class PostProcessingPlugin(QObject, Extension):
|
|||||||
## Execute all post-processing scripts on the gcode.
|
## Execute all post-processing scripts on the gcode.
|
||||||
def execute(self, output_device):
|
def execute(self, output_device):
|
||||||
scene = Application.getInstance().getController().getScene()
|
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")
|
gcode_dict = getattr(scene, "gcode_dict")
|
||||||
if not gcode_dict:
|
if not gcode_dict:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user