mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Try to read and write the current machine setting values for the application
This commit is contained in:
parent
7b686143d2
commit
3b2a6423d0
1 changed files with 7 additions and 0 deletions
|
|
@ -24,6 +24,11 @@ class PrinterApplication(QtApplication):
|
||||||
root = self.getController().getScene().getRoot()
|
root = self.getController().getScene().getRoot()
|
||||||
platform = Platform(root)
|
platform = Platform(root)
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.getMachineSettings().loadValuesFromFile(Resources.getPath(Resources.SettingsLocation, 'ultimaker2.cfg'))
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
self.getRenderer().setLightPosition(Vector(0, 150, 150))
|
self.getRenderer().setLightPosition(Vector(0, 150, 150))
|
||||||
|
|
||||||
camera = Camera('3d', root)
|
camera = Camera('3d', root)
|
||||||
|
|
@ -66,5 +71,7 @@ class PrinterApplication(QtApplication):
|
||||||
if self._engine.rootObjects:
|
if self._engine.rootObjects:
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
|
self.getMachineSettings().saveValuesToFile(Resources.getStoragePath(Resources.SettingsLocation, 'ultimaker2.cfg'))
|
||||||
|
|
||||||
def registerObjects(self, engine):
|
def registerObjects(self, engine):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue