[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20667] branches/soc-2009-aligorith/source /blender/editors/space_nla/nla_draw.c: NLA SoC: Action-line is now drawn with green colouring when a strip is being tweaked to show the relationship between them .
Joshua Leung
aligorith at gmail.com
Sat Jun 6 06:44:18 CEST 2009
Revision: 20667
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20667
Author: aligorith
Date: 2009-06-06 06:44:18 +0200 (Sat, 06 Jun 2009)
Log Message:
-----------
NLA SoC: Action-line is now drawn with green colouring when a strip is being tweaked to show the relationship between them.
Modified Paths:
--------------
branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_draw.c
Modified: branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_draw.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_draw.c 2009-06-06 00:29:22 UTC (rev 20666)
+++ branches/soc-2009-aligorith/source/blender/editors/space_nla/nla_draw.c 2009-06-06 04:44:18 UTC (rev 20667)
@@ -295,14 +295,23 @@
case ANIMTYPE_NLAACTION:
{
+ AnimData *adt= BKE_animdata_from_id(ale->id);
+
/* just draw a semi-shaded rect spanning the width of the viewable area if there's data */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
- if (ale->data)
- glColor4f(0.8f, 0.2f, 0.0f, 0.4f); // reddish color - hardcoded for now
- else
- glColor4f(0.6f, 0.5f, 0.5f, 0.3f); // greyish-red color - hardcoded for now
+ // TODO: if tweaking some action, use the same color as for the tweaked track (quick hack done for now)
+ if (adt && (adt->flag & ADT_NLA_EDIT_ON)) {
+ // greenish color (same as tweaking strip) - hardcoded for now
+ glColor4f(0.3f, 0.95f, 0.1f, 0.3f); // FIXME: only draw the actual range of the action darker?
+ }
+ else {
+ if (ale->data)
+ glColor4f(0.8f, 0.2f, 0.0f, 0.4f); // reddish color - hardcoded for now
+ else
+ glColor4f(0.6f, 0.5f, 0.5f, 0.3f); // greyish-red color - hardcoded for now
+ }
/* draw slightly shifted up for greater separation from standard channels,
* but also slightly shorter for some more contrast when viewing the strips
More information about the Bf-blender-cvs
mailing list