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_utils.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_utils.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_utils.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index f642b284491..ca5af4d4794 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -115,12 +115,24 @@ bAnimListElem *get_active_fcurve_channel (bAnimContext *ac) /* check if any FModifiers to draw controls for - fcm is 'active' modifier * used for the polling callbacks + also for drawing */ +// TODO: restructure these tests +// TODO: maybe for now, just allow editing always for now... short fcurve_needs_draw_fmodifier_controls (FCurve *fcu, FModifier *fcm) { /* don't draw if there aren't any modifiers at all */ if (fcu->modifiers.first == NULL) return 0; + /* if only one modifier + * - don't draw if it is muted or disabled + * - set it as the active one if no active one is present + */ + if (fcu->modifiers.first == fcu->modifiers.last) { + fcm= fcu->modifiers.first; + if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) + return 0; + } + /* if there's an active modifier - don't draw if it doesn't drastically * alter the curve... */ @@ -136,13 +148,6 @@ short fcurve_needs_draw_fmodifier_controls (FCurve *fcu, FModifier *fcm) } } - /* if only one modifier - don't draw if it is muted or disabled */ - if (fcu->modifiers.first == fcu->modifiers.last) { - fcm= fcu->modifiers.first; - if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) - return 0; - } - /* if only active modifier - don't draw if it is muted or disabled */ if (fcm) { if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) |