[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13282] trunk/blender/source/blender/src/ drawaction.c: == Action-Groups - Drawing Tweak ==

Joshua Leung aligorith at gmail.com
Fri Jan 18 01:04:19 CET 2008


Revision: 13282
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13282
Author:   aligorith
Date:     2008-01-18 01:04:19 +0100 (Fri, 18 Jan 2008)

Log Message:
-----------
== Action-Groups - Drawing Tweak ==

Now action-group channels are drawn with a green-ish strip background instead of the usual colours to help distinguish them from other channels, making it easier to identify them.

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawaction.c

Modified: trunk/blender/source/blender/src/drawaction.c
===================================================================
--- trunk/blender/source/blender/src/drawaction.c	2008-01-17 23:38:53 UTC (rev 13281)
+++ trunk/blender/source/blender/src/drawaction.c	2008-01-18 00:04:19 UTC (rev 13282)
@@ -695,9 +695,12 @@
 	float y, sta, end;
 	int act_start, act_end, dummy;
 	char col1[3], col2[3];
+	char col1a[3], col2a[3];
 	
 	BIF_GetThemeColor3ubv(TH_SHADE2, col2);
 	BIF_GetThemeColor3ubv(TH_HILITE, col1);
+	BIF_GetThemeColor3ubv(TH_GROUP, col2a);
+	BIF_GetThemeColor3ubv(TH_GROUP_ACTIVE, col1a);
 
 	/* get editor data */
 	data= get_action_context(&datatype);
@@ -766,12 +769,24 @@
 			if (datatype == ACTCONT_ACTION) {
 				gla2DDrawTranslatePt(di, G.v2d->cur.xmin, y, &frame1_x, &channel_y);
 				
-				if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
-				else glColor4ub(col2[0], col2[1], col2[2], 0x22);
+				if (ale->datatype == ALE_GROUP) {
+					if (sel) glColor4ub(col1a[0], col1a[1], col1a[2], 0x22);
+					else glColor4ub(col2a[0], col2a[1], col2a[2], 0x22);
+				}
+				else {
+					if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
+					else glColor4ub(col2[0], col2[1], col2[2], 0x22);
+				}
 				glRectf(frame1_x,  channel_y-CHANNELHEIGHT/2,  G.v2d->hor.xmax,  channel_y+CHANNELHEIGHT/2);
 				
-				if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
-				else glColor4ub(col2[0], col2[1], col2[2], 0x22);
+				if (ale->datatype == ALE_GROUP) {
+					if (sel) glColor4ub(col1a[0], col1a[1], col1a[2], 0x22);
+					else glColor4ub(col2a[0], col2a[1], col2a[2], 0x22);
+				}
+				else {
+					if (sel) glColor4ub(col1[0], col1[1], col1[2], 0x22);
+					else glColor4ub(col2[0], col2[1], col2[2], 0x22);
+				}
 				glRectf(act_start,  channel_y-CHANNELHEIGHT/2,  act_end,  channel_y+CHANNELHEIGHT/2);
 			}
 			else if (datatype == ACTCONT_SHAPEKEY) {





More information about the Bf-blender-cvs mailing list