mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
SolidView now uses activeContainerStack
CURA-1278
This commit is contained in:
parent
1b9c29579b
commit
0049ee1377
1 changed files with 3 additions and 4 deletions
|
@ -34,12 +34,11 @@ class SolidView(View):
|
||||||
self._disabled_shader.setUniformValue("u_diffuseColor", [0.68, 0.68, 0.68, 1.0])
|
self._disabled_shader.setUniformValue("u_diffuseColor", [0.68, 0.68, 0.68, 1.0])
|
||||||
self._disabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0)))
|
self._disabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0)))
|
||||||
|
|
||||||
if Application.getInstance().getMachineManager().getWorkingProfile():
|
if Application.getInstance().getActiveContainerStack():
|
||||||
profile = Application.getInstance().getMachineManager().getWorkingProfile()
|
|
||||||
|
|
||||||
if Preferences.getInstance().getValue("view/show_overhang"):
|
if Preferences.getInstance().getValue("view/show_overhang"):
|
||||||
angle = profile.getSettingValue("support_angle")
|
angle = Application.getInstance().getActiveContainerStack().getValue("support_angle")
|
||||||
if angle != None:
|
if angle is not None:
|
||||||
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle)))
|
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle)))
|
||||||
else:
|
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.
|
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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue