chiark / gitweb /
Merge tag '15.02.1' into upstream
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 6 Mar 2015 18:18:37 +0000 (13:18 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Fri, 6 Mar 2015 18:18:37 +0000 (13:18 -0500)
Conflicts:
Cura/gui/sceneView.py
README.md

1  2 
Cura/gui/configWizard.py
Cura/gui/mainWindow.py
Cura/gui/sceneView.py
Cura/util/profile.py
Cura/util/resources.py
README.md
package.sh

Simple merge
Simple merge
index cdc2d5506a2918554537acd653be17db9d4e0b73,d875eb768fc5065f0a004ecc3f7dd6ea35d4d253..47a5488f7e7805770fcb13363fc586b381e76dc5
@@@ -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:
                        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):
                                        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):
                                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)
  
Simple merge
Simple merge
diff --cc README.md
index 260ad1f7d9eb89244215ab1361595c41191c4030,f32024f1cbb36bd5c9c18d0c4b08f720e5ffaf48..1b75e5b140f91fe0678813e9f6bc0c7a2db2b5cb
+++ b/README.md
@@@ -93,13 -88,7 +93,9 @@@ To build and install Cura, run the foll
  ```bash\r
  git clone https://github.com/daid/Cura.git\r
  \r
- sudo apt-get install python-opengl\r
- sudo apt-get install python-numpy\r
- sudo apt-get install python-serial\r
- sudo apt-get install python-setuptools\r
- sudo apt-get install curl\r
+ sudo apt-get install python-opengl python-numpy python-serial python-setuptools python-wxgtk2.8 curl\r
 +# Run this also if you're building for 32bit Debian\r
 +sudo apt-get install gcc-multilib g++-4.7-multilib\r
  \r
  cd Cura\r
  \r
diff --cc package.sh
index 761ae93fc2444b7d0015a64eb1143cd6e3bd8a95,e7146f95e7e177adb39833d365e4aff8323ede2f..5ff51f5d70cad3ba35400d1eadcdff0af92c04b4
@@@ -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