diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-01-25 13:45:45 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-01-25 13:46:02 +0300 |
commit | a48a66fb19e72531b713840909d93dde8fa3caa0 (patch) | |
tree | 3257cde25a68dde8e3f51694eb13c26e634e9743 /source/blender/editors/space_graph/graph_draw.c | |
parent | 8850775ce86fc2873f00bdd87aaec11f460c298a (diff) |
A few urgent glLineWidth fixes for anim editors
This fixes some of the issues noted by venomgfx that were caused by
Se25ba162c0b62b19cf367f0f29e29d0c0960978d
Specifically, this commit fixes:
* Timeline: Keyframe lines
* Graph Editor: Curves and Handles
Diffstat (limited to 'source/blender/editors/space_graph/graph_draw.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index c441bdd5813..3ac90200aea 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1008,6 +1008,9 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid if (fcu->flag & FCURVE_ACTIVE) { glLineWidth(2.0); } + else { + glLineWidth(1.0); + } /* anti-aliased lines for less jagged appearance */ if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glEnable(GL_LINE_SMOOTH); @@ -1058,11 +1061,15 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid short mapping_flag = ANIM_get_normalization_flags(ac); float offset; float unit_scale = ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, mapping_flag, &offset); - + + /* apply unit-scaling to all values via OpenGL */ glPushMatrix(); glScalef(1.0f, unit_scale, 1.0f); glTranslatef(0.0f, offset, 0.0f); - + + /* set this once and for all - all handles and handle-verts should use the same thickness */ + glLineWidth(1.0); + if (fcu->bezt) { bool do_handles = draw_fcurve_handles_check(sipo, fcu); @@ -1079,7 +1086,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid /* samples: only draw two indicators at either end as indicators */ draw_fcurve_samples(sipo, ar, fcu); } - + glPopMatrix(); } } |