mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-02 00:34:26 +08:00
18 lines
416 B
Python
18 lines
416 B
Python
from UM.Job import Job
|
|
from UM.Application import Application
|
|
|
|
import os
|
|
|
|
class ProcessGCodeJob(Job):
|
|
def __init__(self, message):
|
|
super().__init__()
|
|
|
|
self._message = message
|
|
|
|
def run(self):
|
|
with open(self._message.filename) as f:
|
|
data = f.read(None)
|
|
Application.getInstance().getController().getScene().gcode = data
|
|
|
|
os.remove(self._message.filename)
|