[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22596] branches/blender2.5/blender/source /blender/editors: 2.5 - Fixing some drawing problems I noticed in ZanQdo' s file...
Joshua Leung
aligorith at gmail.com
Tue Aug 18 13:48:37 CEST 2009
Revision: 22596
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22596
Author: aligorith
Date: 2009-08-18 13:48:34 +0200 (Tue, 18 Aug 2009)
Log Message:
-----------
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.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_draw.c
Modified: branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c 2009-08-18 11:28:57 UTC (rev 22595)
+++ branches/blender2.5/blender/source/blender/editors/animation/anim_channels_defines.c 2009-08-18 11:48:34 UTC (rev 22596)
@@ -1902,6 +1902,10 @@
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)
Modified: branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c 2009-08-18 11:28:57 UTC (rev 22595)
+++ branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c 2009-08-18 11:48:34 UTC (rev 22596)
@@ -926,6 +926,10 @@
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 @@
uiEndBlock(C, block);
uiDrawBlock(C, block);
+
+ glDisable(GL_BLEND);
}
/* free tempolary channels */
Modified: branches/blender2.5/blender/source/blender/editors/space_nla/nla_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_nla/nla_draw.c 2009-08-18 11:28:57 UTC (rev 22595)
+++ branches/blender2.5/blender/source/blender/editors/space_nla/nla_draw.c 2009-08-18 11:48:34 UTC (rev 22596)
@@ -411,7 +411,7 @@
/* 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 @@
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 @@
uiEndBlock(C, block);
uiDrawBlock(C, block);
+
+ glDisable(GL_BLEND);
}
/* free tempolary channels */
More information about the Bf-blender-cvs
mailing list