Fix colors of compatibility mode. CURA-3273

This commit is contained in:
Jack Ha 2017-02-07 13:20:26 +01:00
parent 4b02a425d8
commit ed1fea2d3e

View file

@ -9,6 +9,7 @@ from UM.Scene.SceneNode import SceneNode
from UM.Application import Application from UM.Application import Application
from UM.Mesh.MeshData import MeshData from UM.Mesh.MeshData import MeshData
from UM.Preferences import Preferences from UM.Preferences import Preferences
from UM.View.GL.OpenGLContext import OpenGLContext
from UM.Message import Message from UM.Message import Message
from UM.i18n import i18nCatalog from UM.i18n import i18nCatalog
@ -180,10 +181,10 @@ class ProcessSlicedLayersJob(Job):
material_color_map[0, :] = color material_color_map[0, :] = color
# We have to scale the colors for compatibility mode # We have to scale the colors for compatibility mode
if Application.getInstance().getRenderer().getSupportsGeometryShader(): if OpenGLContext.isLegacyOpenGL() or bool(Preferences.getInstance().getValue("view/force_layer_view_compatibility_mode")):
line_type_brightness = 1.0
else:
line_type_brightness = 0.5 # for compatibility mode line_type_brightness = 0.5 # for compatibility mode
else:
line_type_brightness = 1.0
layer_mesh = layer_data.build(material_color_map, line_type_brightness) layer_mesh = layer_data.build(material_color_map, line_type_brightness)
if self._abort_requested: if self._abort_requested: