__init__.py 800 B

12345678910111213141516171819202122232425262728293031323334
  1. #Copyright (c) 2019 Ultimaker B.V.
  2. #Cura is released under the terms of the LGPLv3 or higher.
  3. import sys
  4. from UM.Logger import Logger
  5. try:
  6. from . import UFPReader
  7. except ImportError:
  8. Logger.log("w", "Could not import UFPReader; libCharon may be missing")
  9. from UM.i18n import i18nCatalog
  10. i18n_catalog = i18nCatalog("cura")
  11. def getMetaData():
  12. return {
  13. "mesh_reader": [
  14. {
  15. "mime_type": "application/x-ufp",
  16. "extension": "ufp",
  17. "description": i18n_catalog.i18nc("@item:inlistbox", "Ultimaker Format Package")
  18. }
  19. ]
  20. }
  21. def register(app):
  22. if "UFPReader.UFPReader" not in sys.modules:
  23. return {}
  24. app.addNonSliceableExtension(".ufp")
  25. return {"mesh_reader": UFPReader.UFPReader()}