From: daid Date: Tue, 31 Jul 2012 09:55:21 +0000 (+0200) Subject: Add model colors for multiple extruders. X-Git-Tag: 12.08~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=547fa84729a2a43f552274de73b9029de7597788;p=cura.git Add model colors for multiple extruders. --- diff --git a/Cura/gui/preferencesDialog.py b/Cura/gui/preferencesDialog.py index 7c781960..036dc705 100644 --- a/Cura/gui/preferencesDialog.py +++ b/Cura/gui/preferencesDialog.py @@ -39,6 +39,8 @@ class preferencesDialog(configBase.configWindowBase): configBase.TitleRow(left, 'Colours') c = configBase.SettingRow(left, 'Model colour', 'model_colour', wx.Colour(0,0,0), '', type = 'preference') + for i in xrange(1, self.oldExtruderAmount): + c = configBase.SettingRow(left, 'Model colour (%d)' % (i+1), 'model_colour%d' % (i+1), wx.Colour(0,0,0), '', type = 'preference') configBase.TitleRow(right, 'Filament settings') 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') diff --git a/Cura/gui/preview3d.py b/Cura/gui/preview3d.py index 7baf2a6b..75aeafc2 100644 --- a/Cura/gui/preview3d.py +++ b/Cura/gui/preview3d.py @@ -407,10 +407,12 @@ class PreviewGLCanvas(glcanvas.GLCanvas): self.gcodeDisplayListMade = None self.gcodeDisplayListCount = 0 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]] - self.objColor[0] = profile.getPreferenceColour('model_colour') def updateProfileToControls(self): self.objColor[0] = profile.getPreferenceColour('model_colour') + self.objColor[1] = profile.getPreferenceColour('model_colour2') + self.objColor[2] = profile.getPreferenceColour('model_colour3') + self.objColor[3] = profile.getPreferenceColour('model_colour3') def OnMouseMotion(self,e): if e.Dragging() and e.LeftIsDown(): diff --git a/Cura/util/profile.py b/Cura/util/profile.py index b7bd21c8..ff3107ca 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -180,6 +180,9 @@ preferencesDefaultSettings = { 'extruder_head_size_height': '80.0', 'model_colour': '#FFCC99', + 'model_colour2': '#33FF1A', + 'model_colour3': '#FF331A', + 'model_colour4': '#1A33FF', } #########################################################