mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 05:39:37 +08:00

They can then decide if it needs to be there. For instance, the monitor stage doesn't want to have this panel. Also each stage can position it where they like, and in the near future I'll make a feature to let it decide whether or not to show the preview button. Contributes to issue CURA-6086.
19 lines
884 B
Python
19 lines
884 B
Python
# Copyright (c) 2019 Ultimaker B.V.
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
import os.path
|
|
from UM.Application import Application
|
|
from UM.PluginRegistry import PluginRegistry
|
|
from cura.Stages.CuraStage import CuraStage
|
|
|
|
## Stage for preparing model (slicing).
|
|
class PrepareStage(CuraStage):
|
|
def __init__(self, parent = None):
|
|
super().__init__(parent)
|
|
Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
|
|
|
|
def _engineCreated(self):
|
|
menu_component_path = os.path.join(PluginRegistry.getInstance().getPluginPath("PrepareStage"), "PrepareMenu.qml")
|
|
main_component_path = os.path.join(PluginRegistry.getInstance().getPluginPath("PrepareStage"), "PrepareMain.qml")
|
|
self.addDisplayComponent("menu", menu_component_path)
|
|
self.addDisplayComponent("main", main_component_path) |