PrepareStage.py 706 B

123456789101112131415161718
  1. # Copyright (c) 2017 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. import os.path
  4. from UM.Application import Application
  5. from UM.Resources import Resources
  6. from cura.Stages.CuraStage import CuraStage
  7. ## Stage for preparing model (slicing).
  8. class PrepareStage(CuraStage):
  9. def __init__(self, parent = None):
  10. super().__init__(parent)
  11. Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
  12. def _engineCreated(self):
  13. sidebar_component_path = os.path.join(Resources.getPath(Application.getInstance().ResourceTypes.QmlFiles), "Sidebar.qml")
  14. self.addDisplayComponent("sidebar", sidebar_component_path)