Bugfix: Selecting AnimData "expanders" in AnimEditors works again
authorJoshua Leung <aligorith@gmail.com>
Thu, 14 Mar 2013 05:01:51 +0000 (05:01 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 14 Mar 2013 05:01:51 +0000 (05:01 +0000)
Somewhere along the line, this functionality broke, even though the code to
handle these settings was still in place for many of these. The main implication
of this fix is that it should now be possible to select a particular AnimData
block, which makes it possible to do things such as changing the action
associated with that AnimData block (i.e. via the "Animation Data" panel in the
NLA Editor), as well as other operations which I've had on the todolist for a
while. Stay tuned!

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

index 235cfd3b23b9078831fd9101cddc6c32456741ec..5080645ecd55fe89490dde4df47d077702cf15ab 100644 (file)
@@ -381,6 +381,10 @@ static short acf_generic_dataexpand_setting_valid(bAnimContext *ac, bAnimListEle
                case ACHANNEL_SETTING_MUTE:
                        return ((ac) && (ac->spacetype == SPACE_NLA));
                        
+               /* select is ok for most "ds*" channels (e.g. dsmat) */
+               case ACHANNEL_SETTING_SELECT:
+                       return 1;
+                       
                /* other flags are never supported */
                default:
                        return 0;
index bfe2a3484b8e1f7e91c9608068d06c692cc414df..07e6d9bca119373c2c9fb9b68c03bf56c9b9ab2c 100644 (file)
@@ -140,7 +140,7 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
                                }
                                else {
                                        Base *b;
-
+                                       
                                        /* deselect all */
                                        /* TODO: should this deselect all other types of channels too? */
                                        for (b = sce->base.first; b; b = b->next) {
index acfb4a51b14128c4012de571eba716d0eadb90bf..242192218c87af49a9a9df57c670e356b064ea66 100644 (file)
@@ -759,7 +759,6 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
                                glEnable(GL_BLEND);
                                
                                /* draw backing strip behind channel name */
-                               // FIXME: hardcoded colors!!!
                                if (group == 5) {
                                        float color[4];