Revision: 23889
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23889
Author:   aligorith
Date:     2009-10-16 12:44:10 +0200 (Fri, 16 Oct 2009)

Log Message:
-----------
Toggle visibility of channels operator (VKEY) in Graph Editor channels view now 
works for channels with the toggles other than F-Curves and Groups

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_channels_edit.c

Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c 
2009-10-16 10:40:03 UTC (rev 23888)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c 
2009-10-16 10:44:10 UTC (rev 23889)
@@ -904,28 +904,14 @@
                if (vis == ACHANNEL_SETFLAG_CLEAR) 
                        break;
                
-               if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & 
FCURVE_VISIBLE))
+               /* set the setting in the appropriate way (if available) */
+               if (ANIM_channel_setting_get(&ac, ale, 
ACHANNEL_SETTING_VISIBLE))
                        vis= ACHANNEL_SETFLAG_CLEAR;
-               else if ((ale->type == ANIMTYPE_GROUP) && !(ale->flag & 
AGRP_NOTVISIBLE))
-                       vis= ACHANNEL_SETFLAG_CLEAR;
        }
                
        /* Now set the flags */
        for (ale= anim_data.first; ale; ale= ale->next) {
-               switch (ale->type) {
-                       case ANIMTYPE_FCURVE: /* F-Curve */
-                       {
-                               FCurve *fcu= (FCurve *)ale->data;
-                               ACHANNEL_SET_FLAG(fcu, vis, FCURVE_VISIBLE);
-                       }
-                               break;
-                       case ANIMTYPE_GROUP: /* Group */
-                       {
-                               bActionGroup *agrp= (bActionGroup *)ale->data;
-                               ACHANNEL_SET_FLAG_NEG(agrp, vis, 
AGRP_NOTVISIBLE);
-                       }
-                               break;
-               }
+               ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, 
vis);
        }
        
        /* cleanup */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to