DisplayFilenameAndLayerOnLCD.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Cura PostProcessingPlugin
  2. # Author: Amanda de Castilho
  3. # Date: August 28, 2018
  4. # Modified: November 16, 2018 by Joshua Pope-Lewis
  5. # Description: This plugin is now an option in 'Display Info on LCD'
  6. from ..Script import Script
  7. from UM.Application import Application
  8. from UM.Message import Message
  9. class DisplayFilenameAndLayerOnLCD(Script):
  10. def initialize(self) -> None:
  11. Message(title = "[Display Filename and Layer on LCD]", text = "This script is now an option in 'Display Info on LCD'. This post processor no longer works.").show()
  12. def getSettingDataString(self):
  13. return """{
  14. "name": "Display Filename And Layer On LCD",
  15. "key": "DisplayFilenameAndLayerOnLCD",
  16. "metadata": {},
  17. "version": 2,
  18. "settings":
  19. {
  20. "enable_script":
  21. {
  22. "label": "Deprecated/Obsolete",
  23. "description": "This script is now included in 'Display Info on LCD'.",
  24. "type": "bool",
  25. "default_value": true
  26. }
  27. }
  28. }"""
  29. def execute(self, data):
  30. Message(title = "[Display Filename and Layer on LCD]", text = "This post is now included in 'Display Info on LCD'. This script will exit.").show()
  31. data[0] += "; [Display Filename and Layer on LCD] Did not run. It is now included in 'Display Info on LCD'.\n"
  32. return data