[Bf-blender-cvs] [efdd489] master: NLA Channel Drawing Refactor: Remove rest of old drawing code for NLA Track channels

Joshua Leung noreply at git.blender.org
Wed Nov 20 13:33:41 CET 2013


Commit: efdd4894e93748e7305d03ca6f32deb869cc2862
Author: Joshua Leung
Date:   Thu Nov 21 01:13:30 2013 +1300
http://developer.blender.org/rBefdd4894e93748e7305d03ca6f32deb869cc2862

NLA Channel Drawing Refactor: Remove rest of old drawing code for NLA Track channels

NLA Track drawing has now been ported over to use the UI widgets
like the rest of the anim channels do in the DopeSheet and Graph
Editors. The main benefit of this for users is that these buttons
will now show tooltips when you hover over them. Hopefully this
will help make the "solo" buttons more discoverable.

I've decided to postpone porting the "Action Line" channels to the
widget system for now, since there are quite a few more issues there
which need quite a bit more time to work through.

===================================================================

M	source/blender/editors/animation/anim_channels_defines.c
M	source/blender/editors/space_nla/nla_draw.c

===================================================================

diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 7b656da..1d9022e 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2972,7 +2972,9 @@ static void ANIM_init_channel_typeinfo_data(void)
 		animchannelTypeInfo[type++] = &ACF_MASKLAYER;    /* Mask Layer */
 		
 		animchannelTypeInfo[type++] = &ACF_NLATRACK;     /* NLA Track */
-		animchannelTypeInfo[type++] = &ACF_NLAACTION;    /* NLA Action */
+		
+		// TODO: this channel type still hasn't been ported over yet, since it requires special attention
+		animchannelTypeInfo[type++] = NULL;              /* NLA Action */
 	}
 } 
 
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index c30862f..c9a8654 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -638,8 +638,8 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
 		{
 			AnimData *adt = ale->adt;
 			
-			short indent = 0, offset = 0, sel = 0, group = 0, nonSolo = 0;
-			int expand = -1, protect = -1, special = -1, mute = -1;
+			short indent = 0, offset = 0, sel = 0, group = 0;
+			int special = -1;
 			char name[128];
 			short do_draw = FALSE;
 			
@@ -660,7 +660,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
 					break;
 				}
 				default: /* handled by standard channel-drawing API */
-					// draw backdrops only...
+					/* (draw backdrops only...) */
 					ANIM_channel_draw(ac, ale, yminc, ymaxc);
 					break;
 			}
@@ -743,25 +743,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
 					/* clear group value, otherwise we cause errors... */
 					group = 0;
 				}
-				else {
-					/* NLA tracks - darker color if not solo track when we're showing solo */
-					UI_ThemeColorShade(TH_HEADER, ((nonSolo == 0) ? 20 : -20));
-					
-					indent += group;
-					offset += 0.35f * U.widget_unit * indent;
-					glBegin(GL_QUADS);
-					glVertex2f(x + offset, yminc);
-					glVertex2f(x + offset, ymaxc);
-					glVertex2f((float)v2d->cur.xmax, ymaxc);
-					glVertex2f((float)v2d->cur.xmax, yminc);
-					glEnd();
-				}
 				
-				/* draw expand/collapse triangle */
-				if (expand > 0) {
-					UI_icon_draw(x + offset, ydatac, expand);
-					offset += 0.85f * U.widget_unit;
-				}
 				
 				/* draw special icon indicating certain data-types */
 				if (special > -1) {
@@ -786,17 +768,6 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
 				glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 				glEnable(GL_BLEND);
 				
-				/* draw protect 'lock' */
-				if (protect > -1) {
-					offset =  0.8f * U.widget_unit;
-					UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, protect);
-				}
-				
-				/* draw mute 'eye' */
-				if (mute > -1) {
-					offset += 0.8f * U.widget_unit;
-					UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, mute);
-				}
 				
 				/* draw NLA-action line 'status-icons' - only when there's an action */
 				if ((ale->type == ANIMTYPE_NLAACTION) && (ale->data)) {




More information about the Bf-blender-cvs mailing list