From 4434c9799ff2154a2484e5366f818dbad2a2437a Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Mon, 12 Feb 2018 12:05:15 -0800 Subject: [PATCH] Cura 3.2 moves gcode_list into a dict gcode_list is now found in a dict of gcode_lists indexed by build plate id --- OctoPrintOutputDevice.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OctoPrintOutputDevice.py b/OctoPrintOutputDevice.py index de90a26..dd7f8f3 100644 --- a/OctoPrintOutputDevice.py +++ b/OctoPrintOutputDevice.py @@ -66,8 +66,12 @@ def requestWrite(self, node, fileName = None, *args, **kwargs): message.show() self._message = message + # find the G-code for the active build plate to print + active_build_plate_id = Application.getInstance().getBuildPlateModel().activeBuildPlate + gcode_dict = getattr(Application.getInstance().getController().getScene(), "gcode_dict") + gcode = gcode_dict[active_build_plate_id] + # send all the gcode to self._stream - gcode = getattr(Application.getInstance().getController().getScene(), "gcode_list") lines = len(gcode) nextYield = time() + 0.05 i = 0