Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2017-07-06 10:48:36 +0300
committerGhostkeeper <rubend@tutanota.com>2017-07-06 10:48:36 +0300
commit6cac15de7d9b9eaf98fd8bef291ba4b6f0470791 (patch)
tree0b704f2fac49b3c3abf3941ecd69811fe8b17cc8 /plugins/CuraEngineBackend/ProcessSlicedLayersJob.py
parentbb68f488dbf9af533b59b11ae3908e5c9b137e3a (diff)
Use default parameter to obtain default colour
There is a built-in mechanism for this, so we don't need to do this ourselves.
Diffstat (limited to 'plugins/CuraEngineBackend/ProcessSlicedLayersJob.py')
-rw-r--r--plugins/CuraEngineBackend/ProcessSlicedLayersJob.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py
index 58c75fff3f..15cda75eb8 100644
--- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py
+++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py
@@ -1,5 +1,5 @@
-# Copyright (c) 2016 Ultimaker B.V.
-# Cura is released under the terms of the AGPLv3 or higher.
+#Copyright (c) 2017 Ultimaker B.V.
+#Cura is released under the terms of the AGPLv3 or higher.
import gc
@@ -180,9 +180,7 @@ class ProcessSlicedLayersJob(Job):
else:
# Single extruder via global stack.
material_color_map = numpy.zeros((1, 4), dtype=numpy.float32)
- color_code = "#e0e000"
- if global_container_stack.material.getMetaDataEntry("color_code") is not None:
- color_code = global_container_stack.material.getMetaDataEntry("color_code")
+ color_code = global_container_stack.material.getMetaDataEntry("color_code", default="#e0e000")
color = colorCodeToRGBA(color_code)
material_color_map[0, :] = color