mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-20 12:49:38 +08:00

This caused a bunch of issues with the getPluginId, as one of the instances didn't got added to the registry (and as such, never got an ID) CURA-5829
29 lines
768 B
Python
29 lines
768 B
Python
# Copyright (c) 2018 Ultimaker B.V.
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
from PyQt5.QtQml import qmlRegisterSingletonType
|
|
|
|
from UM.i18n import i18nCatalog
|
|
from . import SimulationViewProxy, SimulationView
|
|
|
|
catalog = i18nCatalog("cura")
|
|
|
|
|
|
def getMetaData():
|
|
return {
|
|
"view": {
|
|
"name": catalog.i18nc("@item:inlistbox", "Layer view"),
|
|
"weight": 0
|
|
}
|
|
}
|
|
|
|
|
|
def createSimulationViewProxy(engine, script_engine):
|
|
return SimulationViewProxy.SimulationViewProxy()
|
|
|
|
|
|
def register(app):
|
|
simulation_view = SimulationView.SimulationView()
|
|
qmlRegisterSingletonType(SimulationViewProxy.SimulationViewProxy, "UM", 1, 0, "SimulationView", simulation_view.getProxy)
|
|
return { "view": simulation_view}
|