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.
This commit is contained in:
Joshua Leung 2010-01-30 21:11:46 +00:00
parent d7d185ef4a
commit 96daa3348d
3 changed files with 35 additions and 19 deletions

@ -6073,6 +6073,14 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
ar->alignment= RGN_ALIGN_LEFT;
ar->v2d.scroll= V2D_SCROLL_BOTTOM;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
// for some reason, some files still don't get this auto
ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
BLI_addtail(lb, ar);
ar->regiontype= RGN_TYPE_UI;
ar->alignment= RGN_ALIGN_RIGHT;
ar->v2d.scroll= V2D_SCROLL_RIGHT;
ar->v2d.flag = RGN_FLAG_HIDDEN;
break;
case SPACE_NODE:

@ -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 {

@ -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))