__init__.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright (c) 2015 Ultimaker B.V.
  2. # Cura is released under the terms of the AGPLv3 or higher.
  3. from typing import Dict
  4. from . import ThreeMFReader
  5. from . import ThreeMFWorkspaceReader
  6. from UM.i18n import i18nCatalog
  7. from UM.Platform import Platform
  8. catalog = i18nCatalog("cura")
  9. def getMetaData() -> Dict:
  10. # Workarround for osx not supporting double file extensions correclty.
  11. if Platform.isOSX():
  12. workspace_extension = "3mf"
  13. else:
  14. workspace_extension = "curaproject.3mf"
  15. return {
  16. "plugin": {
  17. "name": catalog.i18nc("@label", "3MF Reader"),
  18. "author": "Ultimaker",
  19. "version": "1.0",
  20. "description": catalog.i18nc("@info:whatsthis", "Provides support for reading 3MF files."),
  21. "api": 3
  22. },
  23. "mesh_reader": [
  24. {
  25. "extension": "3mf",
  26. "description": catalog.i18nc("@item:inlistbox", "3MF File")
  27. }
  28. ],
  29. "workspace_reader":
  30. [
  31. {
  32. "extension": workspace_extension,
  33. "description": catalog.i18nc("@item:inlistbox", "3MF File")
  34. }
  35. ]
  36. }
  37. def register(app):
  38. return {"mesh_reader": ThreeMFReader.ThreeMFReader(),
  39. "workspace_reader": ThreeMFWorkspaceReader.ThreeMFWorkspaceReader()}