ExampleScript.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V.
  2. # The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
  3. from ..Script import Script
  4. class ExampleScript(Script):
  5. def __init__(self):
  6. super().__init__()
  7. def getSettingDataString(self):
  8. return """{
  9. "name":"Example script",
  10. "key": "ExampleScript",
  11. "metadata": {},
  12. "version": 2,
  13. "settings":
  14. {
  15. "test":
  16. {
  17. "label": "Test",
  18. "description": "None",
  19. "unit": "mm",
  20. "type": "float",
  21. "default_value": 0.5,
  22. "minimum_value": "0",
  23. "minimum_value_warning": "0.1",
  24. "maximum_value_warning": "1"
  25. },
  26. "derp":
  27. {
  28. "label": "zomg",
  29. "description": "afgasgfgasfgasf",
  30. "unit": "mm",
  31. "type": "float",
  32. "default_value": 0.5,
  33. "minimum_value": "0",
  34. "minimum_value_warning": "0.1",
  35. "maximum_value_warning": "1"
  36. }
  37. }
  38. }"""
  39. def execute(self, data):
  40. return data