PrepareStage.py 738 B

12345678910111213141516171819
  1. # Copyright (c) 2018 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.PluginRegistry import PluginRegistry
  6. from UM.Resources import Resources
  7. from cura.Stages.CuraStage import CuraStage
  8. ## Stage for preparing model (slicing).
  9. class PrepareStage(CuraStage):
  10. def __init__(self, parent = None):
  11. super().__init__(parent)
  12. Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
  13. def _engineCreated(self):
  14. menu_component_path = os.path.join(PluginRegistry.getInstance().getPluginPath("PrepareStage"), "PrepareMenu.qml")
  15. self.addDisplayComponent("menu", menu_component_path)