From ea3e2225ed02866ffdba4f82a0d114659e1c4a8c Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 5 Aug 2016 15:23:47 +0200 Subject: [PATCH] Don't pass support_angle to shader unless it is valid CURA-2058 --- plugins/SolidView/SolidView.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 0329fb53e2..d80f077416 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -8,6 +8,7 @@ from UM.Resources import Resources from UM.Application import Application from UM.Preferences import Preferences from UM.View.Renderer import Renderer +from UM.Settings.Validator import ValidatorState from UM.View.GL.OpenGL import OpenGL @@ -43,7 +44,7 @@ class SolidView(View): if Application.getInstance().getGlobalContainerStack(): if Preferences.getInstance().getValue("view/show_overhang"): angle = Application.getInstance().getGlobalContainerStack().getProperty("support_angle", "value") - if angle is not None: + if angle is not None and Application.getInstance().getGlobalContainerStack().getProperty("support_angle", "validationState") == ValidatorState.Valid: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle))) else: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang.