From 2b446aa280af60aefd304aae904bc16b1b15f373 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 3 Aug 2011 01:22:31 +0000 Subject: Animation channels can now be renamed by Ctrl-Clicking on them, as in the Outliner Channels which can be renamed include: - Scenes, Objects, World, Material, Texture, etc. (i.e. "ID-blocks", or the dark and light blue channels) - Action Groups (green channels) - Action expanders (i.e. "CubeAction", "WorldAction", etc.) - Grease Pencil stuff Channels which CANNOT be renamed, as they mostly use hardcoded values or otherwise include: - Drivers expander - FCurves (they don't technically have a "name"; what is shown is just a user-friendly representation of their rna_paths) --- source/blender/editors/space_graph/graph_draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 67543d37859..7e40f2e5159 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1006,6 +1006,7 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) } { /* second pass: widgets */ uiBlock *block= uiBeginBlock(C, ar, "graph channel buttons", UI_EMBOSS); + size_t channel_index = 0; y= (float)ACHANNEL_FIRST; @@ -1022,11 +1023,12 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) ) { /* draw all channels using standard channel-drawing API */ - ANIM_channel_draw_widgets(ac, ale, block, yminc, ymaxc); + ANIM_channel_draw_widgets(C, ac, ale, block, yminc, ymaxc, channel_index); } /* adjust y-position for next one */ y -= ACHANNEL_STEP; + channel_index++; } uiEndBlock(C, block); -- cgit v1.2.3