chiark / gitweb /
Add model colors for multiple extruders.
authordaid <daid303@gmail.com>
Tue, 31 Jul 2012 09:55:21 +0000 (11:55 +0200)
committerdaid <daid303@gmail.com>
Tue, 31 Jul 2012 09:55:21 +0000 (11:55 +0200)
Cura/gui/preferencesDialog.py
Cura/gui/preview3d.py
Cura/util/profile.py

index 7c7819608c8a24ea2246676e3242e7c05189d215..036dc70551f46d300adf926875fd0deffd227e5a 100644 (file)
@@ -39,6 +39,8 @@ class preferencesDialog(configBase.configWindowBase):
 \r
                configBase.TitleRow(left, 'Colours')\r
                c = configBase.SettingRow(left, 'Model colour', 'model_colour', wx.Colour(0,0,0), '', type = 'preference')\r
+               for i in xrange(1, self.oldExtruderAmount):\r
+                       c = configBase.SettingRow(left, 'Model colour (%d)' % (i+1), 'model_colour%d' % (i+1), wx.Colour(0,0,0), '', type = 'preference')\r
 \r
                configBase.TitleRow(right, 'Filament settings')\r
                c = configBase.SettingRow(right, 'Filament density (kg/m3)', 'filament_density', '1300', 'Weight of the filament per m3. Around 1300 for PLA. And around 1040 for ABS. This value is used to estimate the weight if the filament used for the print.', type = 'preference')\r
index 7baf2a6bfd21623087713cba941d2ccae0ef7be3..75aeafc2f20e5193128e93547cb3d2fcbb24e321 100644 (file)
@@ -407,10 +407,12 @@ class PreviewGLCanvas(glcanvas.GLCanvas):
                self.gcodeDisplayListMade = None\r
                self.gcodeDisplayListCount = 0\r
                self.objColor = [[1.0, 0.8, 0.6, 1.0], [0.2, 1.0, 0.1, 1.0], [1.0, 0.2, 0.1, 1.0], [0.1, 0.2, 1.0, 1.0]]\r
-               self.objColor[0] = profile.getPreferenceColour('model_colour')\r
        \r
        def updateProfileToControls(self):\r
                self.objColor[0] = profile.getPreferenceColour('model_colour')\r
+               self.objColor[1] = profile.getPreferenceColour('model_colour2')\r
+               self.objColor[2] = profile.getPreferenceColour('model_colour3')\r
+               self.objColor[3] = profile.getPreferenceColour('model_colour3')\r
 \r
        def OnMouseMotion(self,e):\r
                if e.Dragging() and e.LeftIsDown():\r
index b7bd21c84704bc5630a60c57d5ee22d5ab8f8cac..ff3107ca817d935a0415c71add522afebf6909b7 100644 (file)
@@ -180,6 +180,9 @@ preferencesDefaultSettings = {
        'extruder_head_size_height': '80.0',\r
        \r
        'model_colour': '#FFCC99',\r
+       'model_colour2': '#33FF1A',\r
+       'model_colour3': '#FF331A',\r
+       'model_colour4': '#1A33FF',\r
 }\r
 \r
 #########################################################\r