DisplayFilenameAndLayerOnLCD.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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.Message import Message
  8. class DisplayFilenameAndLayerOnLCD(Script):
  9. def initialize(self) -> None:
  10. 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()
  11. def getSettingDataString(self):
  12. return """{
  13. "name": "Display Filename And Layer On LCD",
  14. "key": "DisplayFilenameAndLayerOnLCD",
  15. "metadata": {},
  16. "version": 2,
  17. "settings":
  18. {
  19. "enable_script":
  20. {
  21. "label": "Deprecated/Obsolete",
  22. "description": "This script is now included in 'Display Info on LCD'.",
  23. "type": "bool",
  24. "default_value": true
  25. }
  26. }
  27. }"""
  28. def execute(self, data):
  29. Message(title = "[Display Filename and Layer on LCD]", text = "This post is now included in 'Display Info on LCD'. This script will exit.").show()
  30. data[0] += "; [Display Filename and Layer on LCD] Did not run. It is now included in 'Display Info on LCD'.\n"
  31. return data