__init__.py 768 B

12345678910111213141516171819202122232425262728
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from PyQt6.QtQml import qmlRegisterSingletonType
  4. from UM.i18n import i18nCatalog
  5. from . import SimulationViewProxy, SimulationView
  6. catalog = i18nCatalog("cura")
  7. def getMetaData():
  8. return {
  9. "view": {
  10. "name": catalog.i18nc("@item:inlistbox", "Layer view"),
  11. "weight": 0
  12. }
  13. }
  14. def createSimulationViewProxy(engine, script_engine):
  15. return SimulationViewProxy.SimulationViewProxy()
  16. def register(app):
  17. simulation_view = SimulationView.SimulationView()
  18. qmlRegisterSingletonType(SimulationViewProxy.SimulationViewProxy, "UM", 1, 0, simulation_view.getProxy, "SimulationView")
  19. return { "view": simulation_view}