#from Cura.gui.tools import batchRun
from Cura.gui.tools import pidDebugger
from Cura.gui.tools import minecraftImport
-from Cura.gui.tools import youmagineGui
from Cura.util import profile
from Cura.util import version
from Cura.util import meshLoader
self.simpleSettingsPanel = simpleMode.simpleModePanel(self.leftPane, lambda : self.scene.sceneUpdated())
self.normalSettingsPanel = normalSettingsPanel(self.leftPane, lambda : self.scene.sceneUpdated())
- self.youmagineButton = wx.BitmapButton(self.leftPane, -1, wx.Bitmap(resources.getPathForImage('youmagine-icon.png')))
- self.youmagineButton.SetToolTipString("Share your design to YouMagine.com")
- self.youmagineButton.Bind(wx.EVT_BUTTON, self.OnYouMagine)
-
self.leftSizer = wx.BoxSizer(wx.VERTICAL)
self.leftSizer.Add(self.simpleSettingsPanel, 1)
self.leftSizer.Add(self.normalSettingsPanel, 1, wx.EXPAND)
- self.leftSizer.Add(self.youmagineButton, 0, wx.ALIGN_CENTER)
self.leftPane.SetSizer(self.leftSizer)
#Preview window
# Change location of sash to width of quick mode pane
(width, height) = self.simpleSettingsPanel.GetSizer().GetSize()
- (width, height) = self.youmagineButton.GetSize()
self.splitter.SetSashPosition(width, True)
# Disable sash
debugger.Centre()
debugger.Show(True)
- def OnYouMagine(self, e):
- if len(self.scene._scene.objects()) < 1:
- wx.MessageBox('You cannot upload to YouMagine without have a file loaded.', 'Cura', wx.OK | wx.ICON_ERROR)
- return
- youmagineGui.youmagineManager(self, self.scene._scene)
-
def OnCheckForUpdate(self, e):
newVersion = version.checkForNewerVersion()
if newVersion is not None:
from Cura.gui.util import previewTools
from Cura.gui.util import opengl
from Cura.gui.util import openglGui
+from Cura.gui.tools import youmagineGui
class SceneView(openglGui.glGuiPanel):
def __init__(self, parent):
self.viewSelection = openglGui.glComboButton(self, 'View mode', [7,19,11,15,23], ['Normal', 'Overhang', 'Transparent', 'X-Ray', 'Layers'], (-1,0), self.OnViewChange)
self.layerSelect = openglGui.glSlider(self, 10000, 0, 1, (-1,-2), lambda : self.QueueRefresh())
+ self.youMagineButton = openglGui.glButton(self, 26, 'YouMagine', (2,0), lambda button: youmagineGui.youmagineManager(self.GetTopLevelParent(), self))
+
self.notification = openglGui.glNotification(self, (0, 0))
self._slicer = sliceEngine.Slicer(self._updateSliceProgress)
self._container.draw()
- glBindTexture(GL_TEXTURE_2D, self._glRobotTexture)
- glEnable(GL_TEXTURE_2D)
- glPushMatrix()
- glColor4f(1,1,1,1)
- glTranslate(size.GetWidth() - 8,size.GetHeight() - 32,0)
- s = self._buttonSize * 1.4
- glScale(s,s,s)
- glBegin(GL_QUADS)
- glTexCoord2f(1, 0)
- glVertex2f(0,-1)
- glTexCoord2f(0, 0)
- glVertex2f(-1,-1)
- glTexCoord2f(0, 1)
- glVertex2f(-1, 0)
- glTexCoord2f(1, 1)
- glVertex2f(0, 0)
- glEnd()
- glDisable(GL_TEXTURE_2D)
+ # glBindTexture(GL_TEXTURE_2D, self._glRobotTexture)
+ # glEnable(GL_TEXTURE_2D)
+ # glPushMatrix()
+ # glColor4f(1,1,1,1)
+ # glTranslate(size.GetWidth(),size.GetHeight(),0)
+ # s = self._buttonSize * 1
+ # glScale(s,s,s)
+ # glTranslate(-1.2,-0.2,0)
+ # glBegin(GL_QUADS)
+ # glTexCoord2f(1, 0)
+ # glVertex2f(0,-1)
+ # glTexCoord2f(0, 0)
+ # glVertex2f(-1,-1)
+ # glTexCoord2f(0, 1)
+ # glVertex2f(-1, 0)
+ # glTexCoord2f(1, 1)
+ # glVertex2f(0, 0)
+ # glEnd()
+ # glDisable(GL_TEXTURE_2D)
glPopMatrix()
def _OnEraseBackground(self,event):
else:
x = pos[0] * gridSize + bs * 0.2
if pos[1] < 0:
- y = h + pos[1] * gridSize * 1.2 - bs * 0.2
+ y = h + pos[1] * gridSize * 1.2 - bs * 0.0
else:
y = pos[1] * gridSize * 1.2 + bs * 0.2
ctrl.setSize(x, y, gridSize, gridSize)