chiark / gitweb /
Some code cleanup
authorDaid <daid303@gmail.com>
Thu, 3 May 2012 18:11:20 +0000 (20:11 +0200)
committerDaid <daid303@gmail.com>
Thu, 3 May 2012 18:11:20 +0000 (20:11 +0200)
Cura/gui/preview3d.py

index 84eb7266142acc0a8c4920f6fd07096c32f2de57..526659366883f0614569d9b1c0ded54692da0762 100644 (file)
@@ -462,30 +462,22 @@ class PreviewGLCanvas(glcanvas.GLCanvas):
                                layerThickness = curLayerZ - prevLayerZ\r
                                prevLayerZ = layer[-1].list[-1].z\r
                                for path in layer:\r
-                                       c = 1.0\r
-                                       #if curLayerNum != self.parent.layerSpin.GetValue():\r
-                                       #       if curLayerNum < self.parent.layerSpin.GetValue():\r
-                                       #               c = 0.9 - (self.parent.layerSpin.GetValue() - curLayerNum) * 0.1\r
-                                       #               if c < 0.4:\r
-                                       #                       c = 0.4\r
-                                       #       else:\r
-                                       #               break\r
                                        if path.type == 'move':\r
-                                               glColor3f(0,0,c)\r
+                                               glColor3f(0,0,1)\r
                                        if path.type == 'extrude':\r
                                                if path.pathType == 'FILL':\r
-                                                       glColor3f(c/2,c/2,0)\r
+                                                       glColor3f(0.5,0.5,0)\r
                                                elif path.pathType == 'WALL-INNER':\r
-                                                       glColor3f(0,c,0)\r
+                                                       glColor3f(0,1,0)\r
                                                elif path.pathType == 'SUPPORT':\r
-                                                       glColor3f(0,c,c)\r
+                                                       glColor3f(0,1,1)\r
                                                elif path.pathType == 'SKIRT':\r
-                                                       glColor3f(0,c/2,c/2)\r
+                                                       glColor3f(0,0.5,0.5)\r
                                                else:\r
-                                                       glColor3f(c,0,0)\r
+                                                       glColor3f(1,0,0)\r
                                        if path.type == 'retract':\r
-                                               glColor3f(0,c,c)\r
-                                       if c > 0.4 and path.type == 'extrude':\r
+                                               glColor3f(0,1,1)\r
+                                       if path.type == 'extrude':\r
                                                for i in xrange(0, len(path.list)-1):\r
                                                        v0 = path.list[i]\r
                                                        v1 = path.list[i+1]\r