c = configBase.SettingRow(right, "Rotate (deg)", 'model_rotate_base', '0', '')
validators.validFloat(c)
configBase.settingNotify(c, self.preview3d.updateModelTransform)
- configBase.TitleRow(right, "Multiply")
- c = configBase.SettingRow(right, "Multiple X", 'model_multiply_x', '1', '')
- validators.validInt(c)
- configBase.settingNotify(c, self.preview3d.updateModelTransform)
- c = configBase.SettingRow(right, "Multiple Y", 'model_multiply_y', '1', '')
- validators.validInt(c)
- configBase.settingNotify(c, self.preview3d.updateModelTransform)
# load and slice buttons.
loadButton = wx.Button(self, -1, 'Load Model')
self.toolbar2.AddControl(self.flipZ)\r
self.Bind(wx.EVT_CHECKBOX, self.OnFlipZClick, self.flipZ)\r
\r
- self.toolbar2.InsertSeparator(4)\r
+ self.toolbar2.InsertSeparator(self.toolbar2.GetToolsCount())\r
self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Scale'))\r
self.scale = wx.TextCtrl(self.toolbar2, -1, profile.getProfileSetting('model_scale'), size=(21*2,21))\r
self.toolbar2.AddControl(self.scale)\r
self.Bind(wx.EVT_TEXT, self.OnScale, self.scale)\r
+ self.toolbar2.InsertSeparator(self.toolbar2.GetToolsCount())\r
+\r
+ self.toolbar2.AddControl(wx.StaticText(self.toolbar2, -1, 'Copy:'))\r
+ self.mulXsub = wx.Button(self.toolbar2, -1, '-', size=(21,21))\r
+ self.toolbar2.AddControl(self.mulXsub)\r
+ self.Bind(wx.EVT_BUTTON, self.OnMulXSubClick, self.mulXsub)\r
+ self.mulXadd = wx.Button(self.toolbar2, -1, '+', size=(21,21))\r
+ self.toolbar2.AddControl(self.mulXadd)\r
+ self.Bind(wx.EVT_BUTTON, self.OnMulXAddClick, self.mulXadd)\r
+\r
+ self.mulYsub = wx.Button(self.toolbar2, -1, '-', size=(21,21))\r
+ self.toolbar2.AddControl(self.mulYsub)\r
+ self.Bind(wx.EVT_BUTTON, self.OnMulYSubClick, self.mulYsub)\r
+ self.mulYadd = wx.Button(self.toolbar2, -1, '+', size=(21,21))\r
+ self.toolbar2.AddControl(self.mulYadd)\r
+ self.Bind(wx.EVT_BUTTON, self.OnMulYAddClick, self.mulYadd)\r
\r
self.toolbar2.Realize()\r
self.updateToolbar()\r
profile.putProfileSetting('flip_z', str(self.flipZ.GetValue()))\r
self.updateModelTransform()\r
\r
+ def OnMulXAddClick(self, e):\r
+ profile.putProfileSetting('model_multiply_x', str(max(1, int(profile.getProfileSetting('model_multiply_x'))+1)))\r
+ self.updateModelTransform()\r
+\r
+ def OnMulXSubClick(self, e):\r
+ profile.putProfileSetting('model_multiply_x', str(max(1, int(profile.getProfileSetting('model_multiply_x'))-1)))\r
+ self.updateModelTransform()\r
+\r
+ def OnMulYAddClick(self, e):\r
+ profile.putProfileSetting('model_multiply_y', str(max(1, int(profile.getProfileSetting('model_multiply_y'))+1)))\r
+ self.updateModelTransform()\r
+\r
+ def OnMulYSubClick(self, e):\r
+ profile.putProfileSetting('model_multiply_y', str(max(1, int(profile.getProfileSetting('model_multiply_y'))-1)))\r
+ self.updateModelTransform()\r
+\r
def OnScale(self, e):\r
try:\r
scale = float(self.scale.GetValue())\r