mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Compatibility mode scale line type colors
This commit is contained in:
parent
5fff1f6657
commit
a52cb2fa63
2 changed files with 5 additions and 5 deletions
|
@ -18,6 +18,8 @@ class LayerPolygon:
|
||||||
|
|
||||||
__jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(11) == NoneType, numpy.arange(11) == MoveCombingType), numpy.arange(11) == MoveRetractionType)
|
__jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(11) == NoneType, numpy.arange(11) == MoveCombingType), numpy.arange(11) == MoveRetractionType)
|
||||||
|
|
||||||
|
## LayerPolygon
|
||||||
|
# line_thicknesses: array with type as index and thickness as value
|
||||||
def __init__(self, mesh, extruder, line_types, data, line_widths, line_thicknesses):
|
def __init__(self, mesh, extruder, line_types, data, line_widths, line_thicknesses):
|
||||||
self._mesh = mesh
|
self._mesh = mesh
|
||||||
self._extruder = extruder
|
self._extruder = extruder
|
||||||
|
@ -63,8 +65,6 @@ class LayerPolygon:
|
||||||
self._vertex_begin = 0
|
self._vertex_begin = 0
|
||||||
self._vertex_end = numpy.sum( self._build_cache_needed_points )
|
self._vertex_end = numpy.sum( self._build_cache_needed_points )
|
||||||
|
|
||||||
## build
|
|
||||||
# line_thicknesses: array with type as index and thickness as value
|
|
||||||
def build(self, vertex_offset, index_offset, vertices, colors, line_dimensions, extruders, line_types, indices):
|
def build(self, vertex_offset, index_offset, vertices, colors, line_dimensions, extruders, line_types, indices):
|
||||||
if (self._build_cache_line_mesh_mask is None) or (self._build_cache_needed_points is None ):
|
if (self._build_cache_line_mesh_mask is None) or (self._build_cache_needed_points is None ):
|
||||||
self.buildCache()
|
self.buildCache()
|
||||||
|
|
|
@ -180,10 +180,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 bool(Preferences.getInstance().getValue("view/compatibility_mode")):
|
if Application.getInstance().getRenderer().getSupportsGeometryShader():
|
||||||
line_type_brightness = 0.5
|
|
||||||
else:
|
|
||||||
line_type_brightness = 1.0
|
line_type_brightness = 1.0
|
||||||
|
else:
|
||||||
|
line_type_brightness = 0.5 # for compatibility mode
|
||||||
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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue