mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-06 05:39:00 +08:00
Merge branch 'master' of github.com:daid/Cura
This commit is contained in:
commit
00ba00cefa
7
.gitignore
vendored
7
.gitignore
vendored
@ -12,3 +12,10 @@ Printrun
|
|||||||
Cura/current_profile.ini
|
Cura/current_profile.ini
|
||||||
Cura/preferences.ini
|
Cura/preferences.ini
|
||||||
cura.sh
|
cura.sh
|
||||||
|
pypy
|
||||||
|
python
|
||||||
|
drivers
|
||||||
|
printrun.bat
|
||||||
|
cura.bat
|
||||||
|
object-mirror.png
|
||||||
|
object.png
|
||||||
|
@ -181,7 +181,9 @@ class previewPanel(wx.Panel):
|
|||||||
self.toolbar2.AddSeparator()
|
self.toolbar2.AddSeparator()
|
||||||
|
|
||||||
# Scale
|
# Scale
|
||||||
self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Scale'))
|
self.scaleReset = NormalButton(self.toolbar2, self, 'object-scale.png', 'Reset model scale')
|
||||||
|
self.scaleReset.Bind(wx.EVT_BUTTON, self.OnScaleReset)
|
||||||
|
self.toolbar2.AddControl(self.scaleReset)
|
||||||
self.scale = wx.TextCtrl(self.toolbar2, -1, profile.getProfileSetting('model_scale'), size=(21*2,21))
|
self.scale = wx.TextCtrl(self.toolbar2, -1, profile.getProfileSetting('model_scale'), size=(21*2,21))
|
||||||
self.toolbar2.AddControl(self.scale)
|
self.toolbar2.AddControl(self.scale)
|
||||||
self.Bind(wx.EVT_TEXT, self.OnScale, self.scale)
|
self.Bind(wx.EVT_TEXT, self.OnScale, self.scale)
|
||||||
@ -208,11 +210,13 @@ class previewPanel(wx.Panel):
|
|||||||
self.toolbar2.AddSeparator()
|
self.toolbar2.AddSeparator()
|
||||||
|
|
||||||
# Rotate
|
# Rotate
|
||||||
self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Rot'))
|
self.rotateReset = NormalButton(self.toolbar2, self, 'object-rotate.png', 'Reset model rotation')
|
||||||
|
self.rotateReset.Bind(wx.EVT_BUTTON, self.OnRotateReset)
|
||||||
|
self.toolbar2.AddControl(self.rotateReset)
|
||||||
self.rotate = wx.SpinCtrl(self.toolbar2, -1, profile.getProfileSetting('model_rotate_base'), size=(21*3,21), style=wx.SP_WRAP|wx.SP_ARROW_KEYS)
|
self.rotate = wx.SpinCtrl(self.toolbar2, -1, profile.getProfileSetting('model_rotate_base'), size=(21*3,21), style=wx.SP_WRAP|wx.SP_ARROW_KEYS)
|
||||||
self.rotate.SetRange(0, 360)
|
self.rotate.SetRange(0, 360)
|
||||||
|
self.Bind(wx.EVT_TEXT, self.OnRotate)
|
||||||
self.toolbar2.AddControl(self.rotate)
|
self.toolbar2.AddControl(self.rotate)
|
||||||
self.Bind(wx.EVT_SPINCTRL, self.OnRotate, self.rotate)
|
|
||||||
|
|
||||||
self.toolbar2.Realize()
|
self.toolbar2.Realize()
|
||||||
self.updateToolbar()
|
self.updateToolbar()
|
||||||
@ -222,7 +226,7 @@ class previewPanel(wx.Panel):
|
|||||||
sizer.Add(self.glCanvas, 1, flag=wx.EXPAND)
|
sizer.Add(self.glCanvas, 1, flag=wx.EXPAND)
|
||||||
sizer.Add(self.toolbar2, 0, flag=wx.EXPAND|wx.BOTTOM|wx.LEFT|wx.RIGHT, border=1)
|
sizer.Add(self.toolbar2, 0, flag=wx.EXPAND|wx.BOTTOM|wx.LEFT|wx.RIGHT, border=1)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
def OnPopupDisplay(self, e):
|
def OnPopupDisplay(self, e):
|
||||||
self.UpdatePopup(e.GetEventObject())
|
self.UpdatePopup(e.GetEventObject())
|
||||||
self.popup.Show(True)
|
self.popup.Show(True)
|
||||||
@ -260,6 +264,9 @@ class previewPanel(wx.Panel):
|
|||||||
profile.putProfileSetting('model_multiply_y', str(max(1, int(profile.getProfileSetting('model_multiply_y'))-1)))
|
profile.putProfileSetting('model_multiply_y', str(max(1, int(profile.getProfileSetting('model_multiply_y'))-1)))
|
||||||
self.updateModelTransform()
|
self.updateModelTransform()
|
||||||
|
|
||||||
|
def OnScaleReset(self, e):
|
||||||
|
self.scale.SetValue('1.0')
|
||||||
|
|
||||||
def OnScale(self, e):
|
def OnScale(self, e):
|
||||||
profile.putProfileSetting('model_scale', self.scale.GetValue())
|
profile.putProfileSetting('model_scale', self.scale.GetValue())
|
||||||
self.updateModelTransform()
|
self.updateModelTransform()
|
||||||
@ -279,7 +286,10 @@ class previewPanel(wx.Panel):
|
|||||||
self.scale.SetValue(str(scale))
|
self.scale.SetValue(str(scale))
|
||||||
profile.putProfileSetting('model_scale', self.scale.GetValue())
|
profile.putProfileSetting('model_scale', self.scale.GetValue())
|
||||||
self.updateModelTransform()
|
self.updateModelTransform()
|
||||||
|
|
||||||
|
def OnRotateReset(self, e):
|
||||||
|
self.rotate.SetValue(0)
|
||||||
|
|
||||||
def OnRotate(self, e):
|
def OnRotate(self, e):
|
||||||
profile.putProfileSetting('model_rotate_base', self.rotate.GetValue())
|
profile.putProfileSetting('model_rotate_base', self.rotate.GetValue())
|
||||||
self.updateModelTransform()
|
self.updateModelTransform()
|
||||||
|
BIN
Cura/images/object-rotate.png
Normal file
BIN
Cura/images/object-rotate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
BIN
Cura/images/object-scale.png
Normal file
BIN
Cura/images/object-scale.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
Loading…
x
Reference in New Issue
Block a user