diff options
author | fieldOfView <aldo@fieldofview.com> | 2017-11-09 18:04:13 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2017-11-09 18:06:27 +0300 |
commit | 3251e5915be2effbb558379539fd1b7992396c8b (patch) | |
tree | c2c08912b4a41a5b346b13473d05cf8ef886ee38 /plugins/SolidView | |
parent | 8f8bdc059ab9f8065a2b1ec6b75b60608bfffb23 (diff) |
Show the support material for support_mesh
Diffstat (limited to 'plugins/SolidView')
-rw-r--r-- | plugins/SolidView/SolidView.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 3474fa88f2..56d8cf11d7 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -98,12 +98,19 @@ class SolidView(View): extruder_id = node.callDecoration("getActiveExtruder") if extruder_id: extruder_index = max(0, self._extruders_model.find("id", extruder_id)) + + # Use the support extruder instead of the active extruder if this is a support_mesh + per_mesh_stack = node.callDecoration("getStack") + if per_mesh_stack: + if per_mesh_stack.getProperty("support_mesh", "value"): + extruder_index = global_container_stack.getProperty("support_extruder_nr", "value") + try: material_color = self._extruders_model.getItem(extruder_index)["color"] except KeyError: material_color = self._extruders_model.defaultColors[0] - if extruder_index != ExtruderManager.getInstance().activeExtruderIndex: + if int(extruder_index) != int(ExtruderManager.getInstance().activeExtruderIndex): # Shade objects that are printed with the non-active extruder 25% darker shade_factor = 0.6 try: |