mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-05 15:50:41 +08:00
Add option to save profile when slicing
This commit is contained in:
parent
b71180bb47
commit
2d10cb47f4
@ -35,6 +35,7 @@ class preferencesDialog(configBase.configWindowBase):
|
||||
|
||||
configBase.TitleRow(left, 'Slicer settings')
|
||||
c = configBase.SettingRow(left, 'Slicer selection', 'slicer', ['Cura (Skeinforge based)', 'Slic3r'], 'Which slicer to use to slice objects. Usually the Cura engine produces the best results. But Slic3r is developing fast and is faster with slicing.', type = 'preference')
|
||||
c = configBase.SettingRow(left, 'Save profile on slice', 'save_profile', False, 'When slicing save the profile as [stl_file]_profile.ini next to the model.', type = 'preference')
|
||||
|
||||
self.MakeModal(True)
|
||||
main.Fit()
|
||||
|
@ -8,6 +8,7 @@ import threading
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
from util import profile
|
||||
from util import sliceRun
|
||||
|
||||
class sliceProgessPanel(wx.Panel):
|
||||
@ -58,6 +59,8 @@ class sliceProgessPanel(wx.Panel):
|
||||
self.prevStep = 'start'
|
||||
self.totalDoneFactor = 0.0
|
||||
self.startTime = time.time()
|
||||
if profile.getPreference('save_profile') == 'True':
|
||||
profile.saveGlobalProfile(self.filename[: self.filename.rfind('.')] + "_profile.ini")
|
||||
p = subprocess.Popen(sliceRun.getSliceCommand(self.filename), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
self.thread = WorkerThread(self, filename, p)
|
||||
|
||||
|
@ -79,6 +79,7 @@ preferencesDefaultSettings = {
|
||||
'serial_port': 'AUTO',
|
||||
'serial_baud': '250000',
|
||||
'slicer': 'Cura (Skeinforge based)',
|
||||
'save_profile': 'False',
|
||||
}
|
||||
|
||||
def getDefaultProfilePath():
|
||||
|
Loading…
x
Reference in New Issue
Block a user