Experimental drawing tweak: make active F-Curve get drawn with thicker
authorJoshua Leung <aligorith@gmail.com>
Tue, 26 Jul 2011 12:49:43 +0000 (12:49 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 26 Jul 2011 12:49:43 +0000 (12:49 +0000)
line width

This should help make it stand out better from the background, though
it has the risk that values may not be so clearly picked up visually

source/blender/editors/space_graph/graph_draw.c

index b5c253fdbff905c653f6587ab00159c93f0b3b31..ac0455392cce9f801b57c7a8183820de8845e51a 100644 (file)
@@ -877,6 +877,11 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
                                glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], drawFCurveFade(fcu));
                        }
                        
+                       /* draw active F-Curve thicker than the rest to make it stand out */
+                       if (fcu->flag & FCURVE_ACTIVE) {
+                               glLineWidth(2.0);
+                       }
+                       
                        /* anti-aliased lines for less jagged appearance */
                        if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glEnable(GL_LINE_SMOOTH);
                        glEnable(GL_BLEND);
@@ -898,6 +903,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
                        
                        /* restore settings */
                        setlinestyle(0);
+                       glLineWidth(1.0);
                        
                        if ((sipo->flag & SIPO_BEAUTYDRAW_OFF)==0) glDisable(GL_LINE_SMOOTH);
                        glDisable(GL_BLEND);