c = configBase.SettingRow(left, "Scale", 'model_scale', '1.0', '')
validators.validFloat(c, 0.01)
configBase.settingNotify(c, self.preview3d.updateModelTransform)
- configBase.TitleRow(left, "Flip")
- c = configBase.SettingRow(left, "Flip X", 'flip_x', False, '')
- configBase.settingNotify(c, self.preview3d.updateModelTransform)
- c = configBase.SettingRow(left, "Flip Y", 'flip_y', False, '')
- configBase.settingNotify(c, self.preview3d.updateModelTransform)
- c = configBase.SettingRow(left, "Flip Z", 'flip_z', False, '')
- configBase.settingNotify(c, self.preview3d.updateModelTransform)
configBase.TitleRow(right, "Rotate")
c = configBase.SettingRow(right, "Rotate (deg)", 'model_rotate_base', '0', '')
validators.validFloat(c)
self.layerSpin = wx.SpinCtrl(self.toolbar, -1, '', size=(21*4,21), style=wx.SP_ARROW_KEYS)\r
self.toolbar.AddControl(self.layerSpin)\r
self.Bind(wx.EVT_SPINCTRL, self.OnLayerNrChange, self.layerSpin)\r
+\r
+ self.toolbar2 = wx.ToolBar( self, -1 )\r
+ self.toolbar2.SetToolBitmapSize( ( 21, 21 ) )\r
+ self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Flip:'))\r
+\r
+ self.flipX = wx.CheckBox(self.toolbar2, -1, "X")\r
+ self.flipX.SetValue(profile.getProfileSetting('flip_x') == 'True')\r
+ self.toolbar2.AddControl(self.flipX)\r
+ self.Bind(wx.EVT_CHECKBOX, self.OnFlipXClick, self.flipX)\r
+ self.flipY = wx.CheckBox(self.toolbar2, -1, "Y")\r
+ self.flipY.SetValue(profile.getProfileSetting('flip_y') == 'True')\r
+ self.toolbar2.AddControl(self.flipY)\r
+ self.Bind(wx.EVT_CHECKBOX, self.OnFlipYClick, self.flipY)\r
+ self.flipZ = wx.CheckBox(self.toolbar2, -1, "Z")\r
+ self.flipZ.SetValue(profile.getProfileSetting('flip_z') == 'True')\r
+ self.toolbar2.AddControl(self.flipZ)\r
+ self.Bind(wx.EVT_CHECKBOX, self.OnFlipZClick, self.flipZ)\r
\r
self.updateToolbar()\r
\r
sizer = wx.BoxSizer(wx.VERTICAL)\r
sizer.Add(self.toolbar, 0, flag=wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT, border=1)\r
sizer.Add(self.glCanvas, 1, flag=wx.EXPAND)\r
+ sizer.Add(self.toolbar2, 0, flag=wx.EXPAND|wx.BOTTOM|wx.LEFT|wx.RIGHT, border=1)\r
self.SetSizer(sizer)\r
+ \r
+ def OnFlipXClick(self, e):\r
+ profile.putProfileSetting('flip_x', str(self.flipX.GetValue()))\r
+ self.updateModelTransform()\r
+ \r
+ def OnFlipYClick(self, e):\r
+ profile.putProfileSetting('flip_y', str(self.flipY.GetValue()))\r
+ self.updateModelTransform()\r
+\r
+ def OnFlipZClick(self, e):\r
+ profile.putProfileSetting('flip_z', str(self.flipZ.GetValue()))\r
+ self.updateModelTransform()\r
\r
def On3DClick(self, e):\r
self.glCanvas.yaw = 30\r