Exemple #1
0
 def finished(self):
     setPreference('active_machine', self._machine_list.index(self._machine))
     machine_storage = ConfigParser()
     for machine in self._machine_list:
         machine.saveSettingsToConfigParser(machine_storage, 'machine_%d' % (self._machine_list.index(machine)))
     with open(getDefaultPreferenceStoragePath('cut_machines.ini'), "w") as f:
         machine_storage.write(f)
Exemple #2
0
 def setSmall(self, small):
     self._titleBar.setSmall(small)
     for button in self._categoryButtons:
         button.setSmall(small)
     self._pluginsButton.setSmall(small)
     self._loadProfileButton.setSmall(small)
     self._saveButton.setSmall(small)
     if small:
         self._titleBar.setIcon('inner_title_bar_open_arrow.png')
     else:
         self._titleBar.setIcon('inner_title_bar_close_arrow.png')
     preferences.setPreference('profile_small', str(small))
Exemple #3
0
 def setSmall(self, small):
     self._titleBar.setSmall(small)
     for button in self._buttons:
         button.setSmall(small)
     self._pluginsButton.setSmall(small)
     self._loadProfileButton.setSmall(small)
     self._saveButton.setSmall(small)
     if small:
         self._titleBar.setIcon('inner_title_bar_open_arrow.png')
     else:
         self._titleBar.setIcon('inner_title_bar_close_arrow.png')
     preferences.setPreference('profile_small', str(small))
Exemple #4
0
    def _onLoadFile(self, e):
        dlg = wx.FileDialog(self, _("Open 3D model"), style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST|wx.FD_MULTIPLE)

        wildcardList = ';'.join(map(lambda s: '*' + s, meshLoader.loadSupportedExtensions()))
        wildcardFilter = "All (%s)|%s;%s" % (wildcardList, wildcardList, wildcardList.upper())
        wildcardList = ';'.join(map(lambda s: '*' + s, meshLoader.loadSupportedExtensions()))
        wildcardFilter += "|Mesh files (%s)|%s;%s" % (wildcardList, wildcardList, wildcardList.upper())

        dlg.SetWildcard(wildcardFilter)
        if dlg.ShowModal() != wx.ID_OK:
            dlg.Destroy()
            return
        filenames = dlg.GetPaths()
        dlg.Destroy()
        if len(filenames) < 1:
            return

        for filename in filenames:
            self._app.getScene().loadFile(filename)
            setPreference('last_file_path', os.path.dirname(filename))
            self._timeout = 0
Exemple #5
0
 def onClose(self, e):
     if (getPreference('legacy_rendering', 'False') == 'True') != self._legacy_rendering.GetValue():
         setPreference('legacy_rendering', self._legacy_rendering.GetValue())
         wx.MessageBox('When changing [Safemode 3D rendering] a restart of Cura is required.', 'Safemode 3D rendering')
     self.Destroy()