Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-08-18 15:48:34 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-18 15:48:34 +0400
commit34b947d0bc0ef196f11b3ac4370d991b2faa2020 (patch)
tree3760f6a11272e1e92b8ac22dbd9022706142c14c /source/blender/editors
parenta238034c61a47d1bc31098a48ee004bc1740ca8e (diff)
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.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c4
-rw-r--r--source/blender/editors/space_graph/graph_draw.c6
-rw-r--r--source/blender/editors/space_nla/nla_draw.c8
3 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 25e3c112389..acf7467713b 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -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)
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index c2d8d7b1345..f3aa0fac42b 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -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 */
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 3a0e150050b..f30954292b4 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -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 */