diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-12 04:47:45 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-12 04:47:45 +0300 |
commit | 12811a096c8ec23477bdc29a02d5d9492d13e94d (patch) | |
tree | 14f41c650694c6286ab1ff5190752a80dbd43980 /source/blender/editors/space_graph/graph_draw.c | |
parent | 9733eebd60237a841f1876557c55b78e353ae961 (diff) |
Graph Editor: Experimental variations of curve display
* Uneditable F-Curves are drawn with dotted lines (and no handles)
* Muted F-Curves are drawn with a greyish colour. I'm not sure how visible this will be under some other colour schemes. Perhaps this needs as separate theme colour?
Diffstat (limited to 'source/blender/editors/space_graph/graph_draw.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 8df483b9048..077706f0c2b 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -707,11 +707,29 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) /* draw curve - we currently calculate colour on the fly, but that should probably be done in advance instead */ if ( ((fcu->bezt) || (fcu->fpt)) && (fcu->totvert) ) { - col= ipo_rainbow(i, items); - cpack(col); + /* set color/drawing style for curve itself */ + if (fcu->flag & FCURVE_PROTECTED) { + /* protected curves (non editable) are drawn with dotted lines */ + setlinestyle(2); + } + if (fcu->flag & FCURVE_MUTED) { + /* muted curves are drawn in a greyish hue */ + // XXX should we have some variations? + UI_ThemeColorShade(TH_HEADER, 50); + } + else { + // XXX color calculation here really needs to be done in advance instead + col= ipo_rainbow(i, items); + cpack(col); + } + /* draw F-Curve */ draw_fcurve_repeat(fcu, &ar->v2d, 0, 0, &fac); // XXX this call still needs a lot more work + /* restore settings */ + setlinestyle(0); + + /* draw handles and vertices as appropriate */ if (fcu->bezt) { /* only draw handles/vertices on keyframes */ |