Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-10-16 14:44:10 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-16 14:44:10 +0400
commitfbfbb2afe99da6ca4343c7f48b6d98796735086a (patch)
tree2ba881f664b5f0dccc245e2a62cfb09f49fc2d6c /source/blender/editors/animation/anim_channels_edit.c
parent299d7531ed07ba7cefb7344dd528dba4b3dd5844 (diff)
Toggle visibility of channels operator (VKEY) in Graph Editor channels view now works for channels with the toggles other than F-Curves and Groups
Diffstat (limited to 'source/blender/editors/animation/anim_channels_edit.c')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 7ee591f8cab..3b6c7fad471 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -904,28 +904,14 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *op)
if (vis == ACHANNEL_SETFLAG_CLEAR)
break;
- if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & FCURVE_VISIBLE))
- vis= ACHANNEL_SETFLAG_CLEAR;
- else if ((ale->type == ANIMTYPE_GROUP) && !(ale->flag & AGRP_NOTVISIBLE))
+ /* set the setting in the appropriate way (if available) */
+ if (ANIM_channel_setting_get(&ac, ale, ACHANNEL_SETTING_VISIBLE))
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 */