diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-31 00:11:46 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-31 00:11:46 +0300 |
commit | 96daa3348d2ab3bdcc0fbbd3fa685eefe1d01067 (patch) | |
tree | beb9fa501d4c62464f4510e187afd98ba081483e /source/blender/editors/space_graph/graph_draw.c | |
parent | d7d185ef4ab0070d955650454c865fdbfeab5aa6 (diff) |
Bugfixes:
* Old files imported to 2.5 with curves that got cycles FModifiers added during version patching, would not have their keyframes shown for editing.
* #20893: Can't see/show the Properties area in the NLA
I don't know why this worked on a few of my test files several months ago, and yet now fails for many files today.
Diffstat (limited to 'source/blender/editors/space_graph/graph_draw.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 753aeb78dde..8f0cfea5d64 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -337,15 +337,18 @@ static void draw_fcurve_vertices (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu) { - /* don't draw handle lines if handles are not shown */ - if ( (sipo->flag & SIPO_NOHANDLES) || - (fcu->flag & FCURVE_PROTECTED) || - (fcu->flag & FCURVE_INT_VALUES) || - ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) - /* || (fcu->totvert <= 1) */ - ) { + /* don't draw handle lines if handles are not to be shown */ + if ( (sipo->flag & SIPO_NOHANDLES) || /* handles shouldn't be shown anywhere */ + (fcu->flag & FCURVE_PROTECTED) || /* keyframes aren't editable */ + (fcu->flag & FCURVE_INT_VALUES) || /* editing the handles here will cause weird/incorrect interpolation issues */ + ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) || /* group that curve belongs to is not editable */ + (fcu->totvert <= 1) /* do not show handles if there is only 1 keyframe, otherwise they all clump together in an ugly ball */ + ) + { return 0; - } else { + } + else + { return 1; } } @@ -427,7 +430,7 @@ static void draw_fcurve_handles (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, } } - glEnd(); // GL_LINES + glEnd(); // GL_LINES } /* Samples ---------------- */ @@ -922,14 +925,14 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri if (fcu->bezt) { int do_handles = draw_fcurve_handles_check(sipo, fcu); - - if(do_handles) { + + if (do_handles) { /* only draw handles/vertices on keyframes */ glEnable(GL_BLEND); draw_fcurve_handles(ac, sipo, ar, fcu); glDisable(GL_BLEND); } - + draw_fcurve_vertices(ac, sipo, ar, fcu, do_handles); } else { |