From 7d806e7ae97fb2092a1382285f0b9ce040e1892a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 11 Apr 2018 11:59:54 +0200 Subject: [PATCH] Fix rendering before the extruder number decoration is set If a render is triggered before this decorator is set it would crash. The rest of the code is robust against this being None, but here it would give a TypeError. --- plugins/SolidView/SolidView.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index ff5aab96d2..8892ddb138 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -84,7 +84,10 @@ class SolidView(View): per_mesh_stack = node.callDecoration("getStack") - extruder_index = int(node.callDecoration("getActiveExtruderPosition")) + extruder_index = node.callDecoration("getActiveExtruderPosition") + if extruder_index is None: + extruder_index = "0" + extruder_index = int(extruder_index) # Use the support extruder instead of the active extruder if this is a support_mesh if per_mesh_stack: