Skip to content

Commit

Permalink
Fix T49090 - NW broke some color wheel drawing
Browse files Browse the repository at this point in the history
Thanks to @severin for help on IRC :)
  • Loading branch information
gregzaal committed Aug 19, 2016
1 parent 3621a22 commit f65ecaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node_wrangler.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,9 @@ def store_mouse_cursor(context, event):


def draw_line(x1, y1, x2, y2, size, colour=[1.0, 1.0, 1.0, 0.7]):
shademodel_state = bgl.Buffer(bgl.GL_INT, 1)
bgl.glGetIntegerv(bgl.GL_SHADE_MODEL, shademodel_state)

bgl.glEnable(bgl.GL_BLEND)
bgl.glLineWidth(size * dpifac())
bgl.glShadeModel(bgl.GL_SMOOTH)
Expand All @@ -756,7 +759,8 @@ def draw_line(x1, y1, x2, y2, size, colour=[1.0, 1.0, 1.0, 0.7]):
except:
pass
bgl.glEnd()
bgl.glShadeModel(bgl.GL_FLAT)

bgl.glShadeModel(shademodel_state[0])
bgl.glDisable(bgl.GL_LINE_SMOOTH)


Expand Down

0 comments on commit f65ecaf

Please sign in to comment.