From: Youness Alaoui Date: Fri, 6 Mar 2015 18:18:37 +0000 (-0500) Subject: Merge tag '15.02.1' into upstream X-Git-Tag: lulzbot-15.02.1-1.01~38 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2a612b615f3c094a7bbd6c677babdcab45384cbe;p=cura.git Merge tag '15.02.1' into upstream Conflicts: Cura/gui/sceneView.py README.md --- 2a612b615f3c094a7bbd6c677babdcab45384cbe diff --cc Cura/gui/sceneView.py index cdc2d550,d875eb76..47a5488f --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@@ -261,41 -264,33 +278,46 @@@ class SceneView(openglGui.glGuiPanel) if len(removableStorage.getPossibleSDcardDrives()) > 0 and (connectionGroup is None or connectionGroup.getPriority() < 0): drives = removableStorage.getPossibleSDcardDrives() if len(drives) > 1: - dlg = wx.SingleChoiceDialog(self, "Select SD drive", "Multiple removable drives have been found,\nplease select your SD card drive", map(lambda n: n[0], drives)) - if dlg.ShowModal() != wx.ID_OK: - dlg.Destroy() - return - drive = drives[dlg.GetSelection()] - dlg.Destroy() + choices = map(lambda n: n[0], drives) + choices += (_("Custom file destination"), ) + title = _("Multiple removable drives have been found") else: - drive = drives[0] - filename = self._scene._objectList[0].getName() + profile.getGCodeExtension() - - #check if the file is part of the root folder. If so, create folders on sd card to get the same folder hierarchy. - repDir = profile.getPreference("sdcard_rootfolder") + choices = [drives[0][0], _("Custom file destination")] + title = _("A removable drive has been found") + + dlg = wx.SingleChoiceDialog(self, _("Select destination SD card drive\nYou can also select a custom file to save to"), title, choices) + if dlg.ShowModal() != wx.ID_OK: + dlg.Destroy() + return try: - if os.path.exists(repDir) and os.path.isdir(repDir): - repDir = os.path.abspath(repDir) - originFilename = os.path.abspath( self._scene._objectList[0].getOriginFilename() ) - if os.path.dirname(originFilename).startswith(repDir): - new_filename = os.path.splitext(originFilename[len(repDir):])[0] + profile.getGCodeExtension() - sdPath = os.path.dirname(os.path.join(drive[1], new_filename)) - if not os.path.exists(sdPath): - print "Creating replication directory:", sdPath - os.makedirs(sdPath) - filename = new_filename + drive = drives[dlg.GetSelection()] except: - pass + drive = None + dlg.Destroy() - threading.Thread(target=self._saveGCode,args=(drive[1] + filename, drive[1])).start() + if drive is None: + self.showSaveGCode() + else: + filename = self._scene._objectList[0].getName() + profile.getGCodeExtension() + + #check if the file is part of the root folder. + # If so, create folders on sd card to get the same folder hierarchy. + repDir = profile.getPreference("sdcard_rootfolder") - if os.path.exists(repDir) and os.path.isdir(repDir): - repDir = os.path.abspath(repDir) - originFilename = os.path.abspath( self._scene._objectList[0].getOriginFilename() ) - if os.path.dirname(originFilename).startswith(repDir): - filename = os.path.splitext(originFilename[len(repDir):])[0] + profile.getGCodeExtension() - sdPath = os.path.dirname(os.path.join( drive[1], filename)) - if not os.path.exists(sdPath): - print "Creating replication directory:", sdPath - os.makedirs(sdPath) ++ try: ++ if os.path.exists(repDir) and os.path.isdir(repDir): ++ repDir = os.path.abspath(repDir) ++ originFilename = os.path.abspath( self._scene._objectList[0].getOriginFilename() ) ++ if os.path.dirname(originFilename).startswith(repDir): ++ new_filename = os.path.splitext(originFilename[len(repDir):])[0] + profile.getGCodeExtension() ++ sdPath = os.path.dirname(os.path.join( drive[1], new_filename)) ++ if not os.path.exists(sdPath): ++ print "Creating replication directory:", sdPath ++ os.makedirs(sdPath) ++ filename = new_filename ++ except: ++ pass ++ + threading.Thread(target=self._saveGCode,args=(drive[1] + filename, drive[1])).start() elif connectionGroup is not None: connections = connectionGroup.getAvailableConnections() if len(connections) < 2: @@@ -553,10 -566,11 +597,12 @@@ if n > cnt: break if n <= cnt: - self.notification.message("Could not create more than %d items" % (n - 1)) + self.notification.message(_("Could not create more than %d items") % (n - 1)) + self.notification.message(_("Could not create more than %d items") % (n - 1)) self._scene.remove(newObj) - self._scene.centerAll() + if requestedArrangeAll == 2: + self._scene.centerAll() + self.sceneUpdated() def OnSplitObject(self, e): @@@ -656,11 -671,18 +704,18 @@@ else: obj._loadAnim = None self._scene.add(obj) - if not self._scene.checkPlatform(obj): - self._scene.centerAll() - self._selectObject(obj) - if obj.getScale()[0] < 1.0: - self.notification.message(_("Warning: Object scaled down.")) + if pms_transforms is not None and len(pms_transforms) == len(fileList): + obj.setPosition(pms_transforms[objIndex][0]) + obj.applyMatrix(pms_transforms[objIndex][1]) + obj.setScale(pms_transforms[objIndex][2][0], 0, False) + obj.setScale(pms_transforms[objIndex][2][1], 1, False) + obj.setScale(pms_transforms[objIndex][2][2], 2, False) + else: + if not self._scene.checkPlatform(obj): + self._scene.centerAll() + self._selectObject(obj) + if obj.getScale()[0] < 1.0: - self.notification.message("Warning: Object scaled down.") ++ self.notification.message(_("Warning: Object scaled down.")) self.sceneUpdated() def _deleteObject(self, obj): @@@ -1386,20 -1405,20 +1445,21 @@@ glVertex3f(-w, d, 0) glEnd() glDisable(GL_TEXTURE_2D) + glDisable(GL_ALPHA_TEST) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glPopMatrix() - else: - glColor4f(0,0,0,1) - glLineWidth(3) - glBegin(GL_LINES) - glVertex3f(-size[0] / 2, -size[1] / 2, 0) - glVertex3f(-size[0] / 2, -size[1] / 2, 10) - glVertex3f(-size[0] / 2, -size[1] / 2, 0) - glVertex3f(-size[0] / 2+10, -size[1] / 2, 0) - glVertex3f(-size[0] / 2, -size[1] / 2, 0) - glVertex3f(-size[0] / 2, -size[1] / 2+10, 0) - glEnd() + else:''' + # until glEnd() goes inside the else + glColor4f(0,0,0,1) + glLineWidth(3) + glBegin(GL_LINES) + glVertex3f(-size[0] / 2, -size[1] / 2, 0) + glVertex3f(-size[0] / 2, -size[1] / 2, 10) + glVertex3f(-size[0] / 2, -size[1] / 2, 0) + glVertex3f(-size[0] / 2+10, -size[1] / 2, 0) + glVertex3f(-size[0] / 2, -size[1] / 2, 0) + glVertex3f(-size[0] / 2, -size[1] / 2+10, 0) + glEnd() glDepthMask(False) diff --cc README.md index 260ad1f7,f32024f1..1b75e5b1 --- a/README.md +++ b/README.md @@@ -93,13 -88,7 +93,9 @@@ To build and install Cura, run the foll ```bash git clone https://github.com/daid/Cura.git - sudo apt-get install python-opengl - sudo apt-get install python-numpy - sudo apt-get install python-serial - sudo apt-get install python-setuptools - sudo apt-get install curl + sudo apt-get install python-opengl python-numpy python-serial python-setuptools python-wxgtk2.8 curl +# Run this also if you're building for 32bit Debian +sudo apt-get install gcc-multilib g++-4.7-multilib cd Cura diff --cc package.sh index 761ae93f,e7146f95..5ff51f5d --- a/package.sh +++ b/package.sh @@@ -22,15 -22,9 +22,15 @@@ BUILD_TARGET=${1:-none ##Do we need to create the final archive ARCHIVE_FOR_DISTRIBUTION=1 ##Which version name are we appending to the final archive - export BUILD_NAME=15.01 + export BUILD_NAME=15.02.1 TARGET_DIR=Cura-${BUILD_NAME}-${BUILD_TARGET} +##Revision +export REVISION=1.19 + +##Git commit +GIT_HASH=$(git rev-parse --short=4 HEAD) + ##Which versions of external programs to use WIN_PORTABLE_PY_VERSION=2.7.2.1