ProcessGCodeJob.py 622 B

1234567891011121314151617
  1. # Copyright (c) 2015 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from UM.Job import Job
  4. from UM.Application import Application
  5. class ProcessGCodeLayerJob(Job):
  6. def __init__(self, message):
  7. super().__init__()
  8. self._scene = Application.getInstance().getController().getScene()
  9. self._message = message
  10. def run(self):
  11. active_build_plate_id = Application.getInstance().getMultiBuildPlateModel().activeBuildPlate
  12. gcode_list = self._scene.gcode_dict[active_build_plate_id]
  13. gcode_list.append(self._message.data.decode("utf-8", "replace"))