T576: Added {jobname} keyword

This commit is contained in:
Victor Larchenko 2016-11-24 14:03:53 +06:00
parent 67aae55640
commit 7c3728632f

View file

@ -390,7 +390,9 @@ class CuraEngineBackend(Backend):
replaced = line.replace("{print_time}", str(Application.getInstance().getPrintInformation().currentPrintTime.getDisplayString(DurationFormat.Format.ISO8601)))
replaced = replaced.replace("{filament_amount}", str(Application.getInstance().getPrintInformation().materialLengths))
replaced = replaced.replace("{filament_weight}", str(Application.getInstance().getPrintInformation().materialWeights))
# TODO: calculate filament cost
replaced = replaced.replace("{filament_cost}", "Not yet implemented")
replaced = replaced.replace("{jobname}", str(Application.getInstance().getPrintInformation().jobName))
self._scene.gcode_list[self._scene.gcode_list.index(line)] = replaced