2.5 - Fixing some drawing problems I noticed in ZanQdo's file...

Alpha for icons wasn't getting set correctly in animation editors anymore. This commit should fix the issues there, though the scrollbars still have a few minor issues still too. 

Also, NLA strips with repeats now have the repeat indicators drawn only 80% or so of the height, making it easier to distinguish between strips with repeats and bunches of strips.
This commit is contained in:
2009-08-18 11:48:34 +00:00
parent a238034c61
commit 34b947d0bc
3 changed files with 17 additions and 1 deletions

View File

@@ -1902,6 +1902,10 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
selected= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
else
selected= 0;
/* set blending again, as may not be set in previous step */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
/* step 1) draw backdrop ........................................... */
if (acf->draw_backdrop)

View File

@@ -926,6 +926,10 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, SpaceIpo *sipo, ARe
y= (float)ACHANNEL_FIRST;
/* set blending again, as may not be set in previous step */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
for (ale= anim_data.first, i=0; ale; ale= ale->next, i++) {
const float yminc= (float)(y - ACHANNEL_HEIGHT_HALF);
const float ymaxc= (float)(y + ACHANNEL_HEIGHT_HALF);
@@ -944,6 +948,8 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, SpaceIpo *sipo, ARe
uiEndBlock(C, block);
uiDrawBlock(C, block);
glDisable(GL_BLEND);
}
/* free tempolary channels */

View File

@@ -411,7 +411,7 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStr
/* don't draw if line would end up on or after the end of the strip */
if (repeatPos < strip->end)
fdrawline(repeatPos, yminc, repeatPos, ymaxc);
fdrawline(repeatPos, yminc+4, repeatPos, ymaxc-4);
}
}
/* or if meta-strip, draw lines delimiting extents of sub-strips (in same color as outline, if more than 1 exists) */
@@ -875,6 +875,10 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, SpaceNla *snla, ARegi
y= (float)(-NLACHANNEL_HEIGHT);
/* set blending again, as may not be set in previous step */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
/* loop through channels, and set up drawing depending on their type */
for (ale= anim_data.first; ale; ale= ale->next) {
const float yminc= (float)(y - NLACHANNEL_HEIGHT_HALF);
@@ -894,6 +898,8 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, SpaceNla *snla, ARegi
uiEndBlock(C, block);
uiDrawBlock(C, block);
glDisable(GL_BLEND);
}
/* free tempolary channels */